Terminal Basics
Get comfortable with the command line before diving into developer tools.
What Is the Terminal?
Section titled “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
Section titled “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
Section titled “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 |
Try It Yourself
Section titled “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 arepwd
# 2. List what's in this folderls
# 3. Move to your Desktopcd ~/Desktop
# 4. Create a test foldermkdir terminal-test
# 5. List again — you should see your new folderls
# 6. Move into itcd terminal-test
# 7. Confirm you're insidepwd
# 8. Go back up one levelcd ..
# 9. Clean up — remove the test folderrmdir terminal-test# 1. Check where you areGet-Location
# 2. List what's in this folderdir
# 3. Move to your Desktopcd ~\Desktop
# 4. Create a test foldermkdir terminal-test
# 5. List again — you should see your new folderdir
# 6. Move into itcd terminal-test
# 7. Confirm you're insideGet-Location
# 8. Go back up one levelcd ..
# 9. Clean up — remove the test folderrmdir terminal-testIf every step worked, you’re ready for the rest of the setup guides.
Key Concepts
Section titled “Key Concepts”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
Section titled “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
Section titled “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
Section titled “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
Section titled “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?