You know the commands. Now let's build the mental model that makes them intuitive. Once you understand how folders are organized, navigation becomes second nature.
π³ The Folder Tree
Your Mac's file system is organized like an upside-down tree. At the top is the "root" (represented by /), and everything branches down from there.
When you open Terminal, you start in your home folder (~). From there, you can navigate up toward the root or down into subfolders.
π Paths: Absolute vs. Relative
There are two ways to specify a location:
Absolute paths start from the root (/) and spell out the complete location:
Relative paths start from wherever you currently are:
π‘ How to Tell Them Apart
If it starts with / or ~, it's absolute (works from anywhere). If it doesn't, it's relative (depends on where you are now).
π§ Navigation Patterns
Here are the moves you'll use most often:
Going Deeper (Into Subfolders)
Or all at once:
Going Up (To Parent Folders)
Going Home
Going Somewhere Specific
β¨ The Tab Completion Trick
Start typing a folder name and press Tab. The terminal will auto-complete it for you. Type cd Doc and press Tabβit becomes cd Documents/. This saves typing and prevents typos.
π A Typical Workflow
Let's walk through what you'll do when starting a new Claude Code project:
That last command (claude) launches Claude Code in your current folder. Everything Claude creates will go in this folder.
π¨ Common Mistakes (and Fixes)
You're trying to go somewhere that doesn't exist. Check your spelling, or use ls to see what folders are actually available.
Run pwd to see your current location. Then cd ~ to go home and start fresh.
Either put quotes around it (cd "My Folder") or escape the space with a backslash (cd My\ Folder). Better yet: avoid spaces in project folder names.
π― The Mental Model
Think of the terminal like a text-based Finder. You're always "in" a folder, looking at its contents. You can:
- Look around (
ls) - Check your location (
pwd) - Move to a different folder (
cd) - Create new folders (
mkdir)
That's it. You're not doing anything you couldn't do in Finderβyou're just doing it with text commands instead of mouse clicks.
π― Navigation Unlocked!
You understand how folders work and how to move between them. Time to put it all together with some hands-on practice.
Topic 0.3 Complete β’ Up Next: 0.4 β Practice Exercises