Skip to content

Terminals

The terminal (also called the command line, shell, or CLI) is how developers talk directly to their computer using text commands instead of clicking around.

You might be thinking: “Why would I type commands when I can just click?” Fair question. Here’s why:

  1. Speed — Once you know the commands, typing is faster than clicking through menus
  2. Power — Some things can only be done via terminal
  3. AI coding tools use them — Claude Code, npm, git, and most dev tools run in the terminal
  4. Automation — You can script repetitive tasks

On Mac:

  • Press Cmd + Space, type “Terminal”, and hit Enter
  • Or find it in Applications → Utilities → Terminal

On Windows:

  • Press Win + R, type “cmd” or “powershell”, and hit Enter
  • Or search for “Terminal”, “Command Prompt”, or “PowerShell” in the Start menu
  • For modern development, use PowerShell or Windows Terminal

In VS Code / Cursor:

  • Press Ctrl + ` (backtick) or go to View → Terminal
  • This opens a terminal right inside your editor — super convenient

Here are the essential commands you’ll use constantly:

Terminal window
pwd

“Print Working Directory” — shows your current location in the file system.

Terminal window
ls

Lists all files and folders in your current directory. On Windows Command Prompt, use dir instead.

Terminal window
cd folder-name

Moves you into a folder. Use cd .. to go up one level.

Terminal window
mkdir my-new-folder

“Make Directory” — creates a new folder.

Terminal window
touch filename.txt

Creates an empty file. On Windows PowerShell, use New-Item filename.txt.

Terminal window
clear

Clears all the text in your terminal. On Windows, use cls.

When working with AI coding tools and web projects, you’ll frequently use:

Terminal window
npm install

Installs all the project dependencies (the packages your project needs).

Terminal window
npm run dev

Starts your development server so you can preview your project locally.

Terminal window
git status

Shows which files have changed in your project.

Terminal window
git push

Uploads your changes to GitHub (remote).

  1. Use Tab to autocomplete — Start typing a file or folder name, then press Tab. The terminal will finish it for you.

  2. Use the up arrow — Press the up arrow key to cycle through previous commands. Super handy for re-running things.

  3. Read the errors — When something fails, the terminal tells you why. Read the error message — it usually points to the problem.

  4. Copy/paste works — On Mac, use Cmd + C / Cmd + V. On Windows Terminal, just right-click to paste.

  5. Don’t panic — If you get stuck, type exit to close the terminal and start fresh.

It might feel intimidating at first, but the terminal is just a different way to interact with your computer. With AI coding assistants, you’ll often see them generating terminal commands — and now you’ll understand what they’re doing.