Terminal Basics
What you need to know to use Claude Code
What is a Terminal?
A terminal (also called command line, shell, or console) is a text-based interface to your computer. Instead of clicking icons, you type commands.
Why does this matter for Claude Code? Claude Code runs in the terminal. It reads your files, runs code, and shows results - all through text commands.
Don’t worry: You don’t need to become a terminal expert. Just learn the basics below.
Setup details below were cross-checked against official documentation on 2026-02-17.
Opening the Terminal
Option 1: Command Prompt
- Press
Winkey - Type
cmd - Click “Command Prompt”
Option 2: PowerShell
- Press
Winkey - Type
powershell - Click “PowerShell”
Option 3: Windows Terminal (recommended app)
If you have Windows 11 or installed Windows Terminal:
- Press
Winkey - Type
terminal - Click “Terminal”
Use a PowerShell tab inside Windows Terminal for the command examples below.
Option 1: Spotlight
- Press
Cmd + Space - Type
terminal - Press
Enter
Option 2: Finder
- Open Finder
- Go to Applications → Utilities
- Double-click “Terminal”
Tip: Keep Terminal in your Dock for quick access.
Most distributions:
- Press
Ctrl + Alt + T
Or: Search for “Terminal” in your applications menu.
Essential Commands
These are the only commands you need to know to use Claude Code.
Where Am I?
Shows your current folder (directory).
cd
or
pwd
(in PowerShell)
pwd
List Files
See what’s in the current folder.
dir
or
ls
(in PowerShell)
ls
To see more details:
ls -la
Change Folder
Move to a different folder.
cd Documents
Go up one level:
cd ..
Go to a specific path:
cd C:\Users\YourName\Documents\project
cd Documents
Go up one level:
cd ..
Go to a specific path:
cd /Users/YourName/Documents/project
Go to home folder:
cd ~
Clear the Screen
Clean up the terminal when it gets cluttered.
cls
clear
Paths: Finding Your Files
A path is the address of a file or folder on your computer.
Examples
C:\Users\Anna\Documents\data-project\hotels.csv
Parts: - C: - the drive - \Users\Anna\Documents\data-project\ - folders - hotels.csv - the file
/Users/Anna/Documents/data-project/hotels.csv
Parts: - /Users/Anna/Documents/data-project/ - folders - hotels.csv - the file
/home/anna/Documents/data-project/hotels.csv
Parts: - /home/anna/Documents/data-project/ - folders - hotels.csv - the file
Tips for Paths
- Spaces in names: Use quotes:
cd "My Documents" - Tab completion: Type part of a name and press
Tabto autocomplete - Drag and drop: On Mac (and many Windows terminals), you can drag a folder into the terminal to paste its path
Starting Claude Code
Once you’re in the folder with your data:
claude
That’s it! Claude Code starts and you can begin typing your requests.
Example Workflow
cd C:\Users\Anna\Documents\austrian-hotels
claude
cd ~/Documents/austrian-hotels
claude
cd ~/Documents/austrian-hotels
claude
Common Issues
“Command not found” for claude
Claude Code isn’t installed, or not in your PATH.
Fix: Follow the Claude Code install guide
“No such file or directory”
You typed a path that doesn’t exist.
Fix: 1. Use ls (or dir) to see what’s actually in your folder 2. Check spelling 3. Use Tab completion
“Permission denied”
You don’t have access to that folder/file.
Fix: - Work in your own folder first (for example, ~/Documents on Mac/Linux or %USERPROFILE%\Documents on Windows) - Use sudo (Mac/Linux) or Administrator mode (Windows) only when a setup/install step explicitly requires elevated permissions - Avoid running everyday project commands as admin/root unless you know the command needs it
Quick Reference Card
| Task | Windows | Mac / Linux |
|---|---|---|
| Open terminal | Win → type terminal (or powershell) |
Cmd+Space → type terminal |
| Where am I? | cd or pwd (PowerShell) |
pwd |
| List files | dir or ls (PowerShell) |
ls |
| Change folder | cd foldername |
cd foldername |
| Go up | cd .. |
cd .. |
| Clear screen | cls |
clear |
| Start Claude | claude |
claude |
| Exit Claude | type exit or /exit |
type exit or /exit |
You’re Ready!
That’s all you need. The terminal might feel unfamiliar at first, but after using it a few times with Claude Code, it becomes natural.
Next step: Install Claude Code