# The Terminal

A terminal is a box where you type a command and the computer answers. VS Code has one built in: **View → Terminal**.

This page is about what goes wrong around the commands this course runs. The commands themselves, and when to use each one, are in the [Python projects guide](/guides/python-projects/).

## Where most failures come from

**Where you are matters.** A command runs in the folder the terminal is sitting in, its working directory. Typing `uv run marimo edit` in your home folder and in your repository does two different things, and only one of them works. In GitHub Desktop, **Open in Visual Studio Code** puts you in the right folder every time. That button exists for this reason.

To see where you are, read the prompt, which usually ends in the folder's name. If it does not, type `pwd` and press Enter. It works in PowerShell on Windows and in zsh on macOS. If the prompt is `>>>`, you are inside Python, and [Where Am I Typing?](/guides/where-am-i-typing/) shows the way back.

**Copy a command from the page and paste it.** The computer reads a command exactly as written, so a missing space, one dash where there should be two, or a lost letter makes a different command, and the error comes back in words you have not learned yet. Select the whole line, copy it, click into the terminal, and paste with `Ctrl+V` (Windows) or `Cmd+V` (macOS), then press Enter. If a command comes back with something like `unexpected argument`, copy it from the page again.

**A command is a program, then what you want it to do.** `uv run marimo edit` is four words and only the first is a program. `uv` is the tool, `run` tells it to run something inside your project, and `marimo edit` is what to run. Spaces separate the words, so a folder name with a space in it has to be quoted, which is one reason this course asks you to name things without spaces.

**Press `Ctrl` and `C` together to stop whatever is running.** Some commands finish and hand the prompt back to you. Others keep running until you stop them, and `uv run marimo edit` is one of those: it stays up serving your notebook. When you stop it, marimo asks `Are you sure you want to quit? (y/N)`, so type `y` and press Enter. **Closing that terminal closes your notebook.** Leave it alone and open a second terminal if you need one.

## Errors you will meet

**`command not found`** or **`is not recognized as the name of a cmdlet`**

The program is not installed, or your terminal does not know where it is. A terminal reads its list of places to look for programs, called the PATH, when it starts. On Windows, a terminal inside VS Code takes that list from VS Code, which read it when VS Code itself started, so a program installed while VS Code was open stays invisible there, even in a new terminal panel.

**Quit VS Code completely.** Closing the terminal panel is not enough. Press `Cmd+Q` (macOS), or close every VS Code window (Windows), then open VS Code again from GitHub Desktop and run the command again. This works on either system.

If it still fails, the installer probably never finished. Run it again, quit and reopen VS Code once more, and bring the error to class if the command is still not found.

**`No such file or directory`**

You are in the wrong folder, or the file is named differently from what you typed. The file tree on the left of VS Code shows you which. Note that your laptop almost certainly treats `Orders.csv` and `orders.csv` as the same file, because macOS and Windows both ignore case by default, while git, GitHub and Linux do not. So a file committed as `Orders.csv` and read as `orders.csv` runs for you and fails for me.

**`Permission denied`**

Usually a file the system is protecting, or a folder you should not be writing to. In this course it most often means you are trying to work inside a synced folder. Nothing in this course needs administrator rights.

**`Address already in use`** or a notebook that opens showing yesterday's work

Something is already running on that port, and it is almost always a notebook you opened earlier and forgot. Find that terminal and press `Ctrl` and `C`, or close it.

## Read the last line

A command that fails usually prints several lines. The last one names the problem; the ones above it are the route it took to get there. This is the same habit as reading a Python traceback, and it is the same reason: the first line is where the story starts and the last line is where it ends.

## Windows and macOS

The terminal in VS Code is PowerShell on Windows and zsh on macOS. Everything on this page works in both. Where they differ, this course does not go: you will not be writing shell scripts.

They differ in how they write paths. Windows uses `\` and macOS uses `/`. Python accepts `/` on both, so write `data/orders.csv` everywhere and it works on either machine.
