Skip to content

Terminal Basics

Get comfortable with the command line before diving into developer tools.

The terminal is a text-based way to talk to your computer. Instead of clicking through menus and windows, you type commands and press Enter.

Why does this matter? Most developer tools — Git, Claude Code, and other builder tools — are designed to run from the terminal. Every setup guide that follows assumes you can open a terminal and type a command.

The good news: you only need a handful of commands to get started.

You have two quick ways to open Terminal:

  1. Spotlight Search: Press Cmd + Space, type Terminal, press Enter
  2. Finder: Open Applications > Utilities > Terminal

You’ll see a window with a short line of text ending in $ or % and a blinking cursor. That’s your prompt — it means the terminal is ready for a command.

These are the commands you’ll use most often. macOS/Linux and Windows PowerShell use slightly different names for some of them.

CommandWhat It Does
pwdPrint your current directory (where am I?)
lsList files and folders in the current directory
cd foldernameMove into a folder
cd ..Go back up one level
cd ~Go to your home directory
mkdir foldernameCreate a new folder
clearClear the screen

Open your terminal and follow along. This short exercise builds muscle memory with commands you’ll use throughout these guides.

Terminal window
# 1. Check where you are
pwd
# 2. List what's in this folder
ls
# 3. Move to your Desktop
cd ~/Desktop
# 4. Create a test folder
mkdir terminal-test
# 5. List again — you should see your new folder
ls
# 6. Move into it
cd terminal-test
# 7. Confirm you're inside
pwd
# 8. Go back up one level
cd ..
# 9. Clean up — remove the test folder
rmdir terminal-test

If every step worked, you’re ready for the rest of the setup guides.

A path describes the location of a file or folder on your computer.

  • Absolute path — the full address from the root of your drive:
    • macOS: /Users/yourname/Documents/project
    • Windows: C:\Users\yourname\Documents\project
  • Relative path — the address from wherever you are right now:
    • cd Documents (move into a Documents folder inside your current location)
    • cd ../other-folder (go up one level, then into a different folder)

Notice that macOS/Linux uses forward slashes (/) and Windows uses backslashes (\).

The $, %, or > at the start of each line is the prompt. It means the terminal is waiting for your input. You don’t type the prompt character — just the command after it.

  • macOS/Linux: File and folder names are case-sensitive. Documents and documents are different folders.
  • Windows: File and folder names are not case-sensitive. Documents and documents refer to the same folder.

Start typing a file or folder name and press Tab. The terminal will auto-complete the name if there’s a match, or show you options if there are multiple matches. This saves typing and helps avoid typos.

“I typed a command and nothing happened”

  • Make sure you pressed Enter after the command
  • Check for typos — commands must be spelled exactly right

“command not found” or “not recognized”

  • The tool you’re trying to use isn’t installed, or your system doesn’t know where to find it
  • Follow the relevant installation guide, then try again

“Permission denied”

  • You may need administrator rights
  • On macOS, prefix the command with sudo (you’ll be asked for your password)
  • On Windows, right-click PowerShell and choose Run as Administrator

“I’m lost and don’t know where I am”

  • Run pwd (macOS/Linux) or Get-Location (Windows) to see your current directory
  • Run cd ~ to go back to your home directory
Ask AI for help

If you’re stuck, paste this into ChatGPT, Claude, or Gemini:

I’m learning to use the terminal on [Mac / Windows] and ran into this issue: [describe what happened or paste the error message]. I was trying to [what you were doing]. What does this mean and what should I try?