Terminal Basics¶
Get comfortable with the command line before diving into developer tools.
What Is the Terminal?¶
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.
Open Your Terminal¶
You have two quick ways to open Terminal:
- Spotlight Search: Press Cmd + Space, type
Terminal, press Enter - 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.
- Start Menu: Click Start, type
PowerShell, click Windows PowerShell - Windows Terminal (if installed): Click Start, type
Terminal, click Terminal
You'll see a window with a line ending in > and a blinking cursor. That's your prompt — it means the terminal is ready for a command.
Essential Commands¶
These are the commands you'll use most often. macOS/Linux and Windows PowerShell use slightly different names for some of them.
| Command | What It Does |
|---|---|
pwd | Print your current directory (where am I?) |
ls | List files and folders in the current directory |
cd foldername | Move into a folder |
cd .. | Go back up one level |
cd ~ | Go to your home directory |
mkdir foldername | Create a new folder |
clear | Clear the screen |
| Command | What It Does |
|---|---|
Get-Location | Print your current directory (where am I?) |
dir | List files and folders in the current directory |
cd foldername | Move into a folder |
cd .. | Go back up one level |
cd ~ | Go to your home directory |
mkdir foldername | Create a new folder |
cls | Clear the screen |
PowerShell aliases
PowerShell also accepts pwd, ls, and clear as shortcuts. If you see those commands in a guide, they'll work on Windows too.
Try It Yourself¶
Open your terminal and follow along. This short exercise builds muscle memory with commands you'll use throughout these guides.
# 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
# 1. Check where you are
Get-Location
# 2. List what's in this folder
dir
# 3. Move to your Desktop
cd ~\Desktop
# 4. Create a test folder
mkdir terminal-test
# 5. List again — you should see your new folder
dir
# 6. Move into it
cd terminal-test
# 7. Confirm you're inside
Get-Location
# 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.
Key Concepts¶
Paths¶
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
- macOS:
- 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 Prompt¶
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.
Case Sensitivity¶
- macOS/Linux: File and folder names are case-sensitive.
Documentsanddocumentsare different folders. - Windows: File and folder names are not case-sensitive.
Documentsanddocumentsrefer to the same folder.
Tab Completion¶
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.
Troubleshooting¶
"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) orGet-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?