0.3

Navigating Folders

Building a mental map of your file system

πŸ—ΊοΈ Concept + Practice ⏱️ ~10 minutes

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.

/ β”œβ”€β”€ Users/ β”‚ └── yourname/ ← This is ~ (your home folder) β”‚ β”œβ”€β”€ Desktop/ β”‚ β”œβ”€β”€ Documents/ β”‚ β”œβ”€β”€ Downloads/ β”‚ └── Projects/ ← You might create this β”œβ”€β”€ Applications/ └── System/

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:

/Users/yourname/Documents/Projects/my-app

Relative paths start from wherever you currently are:

Documents/Projects/my-app

πŸ’‘ 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)

cd Documents cd Projects cd my-app

Or all at once:

cd Documents/Projects/my-app

Going Up (To Parent Folders)

cd .. # Up one level cd ../.. # Up two levels cd ../../.. # Up three levels

Going Home

cd ~ # Go to home folder cd # Same thing (cd with no argument goes home)

Going Somewhere Specific

cd ~/Desktop # Home β†’ Desktop cd ~/Documents/Projects # Home β†’ Documents β†’ Projects cd /Applications # Root β†’ Applications

✨ 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:

# 1. Open Terminal (you start in ~) pwd # Output: /Users/yourname # 2. Go to where you keep projects cd ~/Documents/Projects # 3. Create a folder for your new project mkdir reading-companion # 4. Go into that folder cd reading-companion # 5. Confirm you're in the right place pwd # Output: /Users/yourname/Documents/Projects/reading-companion # 6. Start Claude Code here claude

That last command (claude) launches Claude Code in your current folder. Everything Claude creates will go in this folder.

🚨 Common Mistakes (and Fixes)

"No such file or directory"

You're trying to go somewhere that doesn't exist. Check your spelling, or use ls to see what folders are actually available.

"I'm lostβ€”where am I?"

Run pwd to see your current location. Then cd ~ to go home and start fresh.

"The folder name has a space"

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