Terminal Basics
What this lesson teaches
The terminal (also called command line or shell) is how you talk directly to your computer. Claude Code runs in the terminal, so you need to be comfortable with the basics.
Why learn the terminal?
GUIs are convenient, but the terminal is more powerful and precise. When working with Claude Code, you'll run commands, navigate directories, and manage files—all through text.
Note: On Mac/Linux, use Terminal. On Windows, use PowerShell or WSL (Windows Subsystem for Linux).
Essential navigation commands
Where am I?
pwd
Prints the current directory path (Print Working Directory).
What's here?
ls
Lists files and folders in the current directory. Use ls -la for details including hidden files.
Move to a folder
cd folder-name
Changes directory. Use cd .. to go up one level, cd ~ to go home.
File operations
mkdir project— Create a new foldertouch file.txt— Create an empty filerm file.txt— Delete a file (careful: no trash!)rm -r folder— Delete a folder and contentscp file.txt copy.txt— Copy a filemv old.txt new.txt— Move or rename a file
Understanding paths
A path is the address of a file or folder.
- Absolute path: Full address from root —
/Users/you/projects/app - Relative path: From current location —
./src/index.jsor../config
Tip: Use Tab to autocomplete file and folder names. Saves time and prevents typos.
Key Takeaways
pwd,ls,cd— navigate your filesystemmkdir,touch,rm,cp,mv— manage files- Understand absolute vs relative paths
- Tab completion is your friend