0.2

Five Commands You Need

The practical minimum to start working in the terminal

⌨️ Tutorial ⏱️ ~15 minutes

You don't need to memorize dozens of commands. For working with Claude Code, you really only need five. Let's learn them one at a time, with examples you can try right now.

🚀 First: Open Terminal

On a Mac, the fastest way to open Terminal is:

  1. Press Command + Space to open Spotlight
  2. Type Terminal
  3. Press Enter

You'll see a window with a prompt that looks something like this:

yourname@MacBook ~ %

That ~ means you're in your home folder. The % is where you type commands. Let's learn what to type.

📍 Command 1: pwd — Where Am I?

pwd stands for "print working directory." It tells you where you currently are in your file system.

pwd

Try it now. You should see something like:

/Users/yourname

This is your home folder—the same place you see when you open Finder and click on your name in the sidebar.

💡 Why This Matters

When you run Claude Code, it operates in whatever folder you're currently in. Knowing where you are is essential—pwd is how you check.

📂 Command 2: ls — What's Here?

ls stands for "list." It shows you what files and folders are in your current location.

ls

You'll see a list of files and folders—things like Desktop, Documents, Downloads. These are the same folders you'd see in Finder.

Want more detail? Add the -la flag:

ls -la

This shows hidden files (files starting with a dot) and additional details like file sizes and dates.

What's a "flag"?

Flags are options you add to commands to modify their behavior. They usually start with a dash. The -l flag means "long format" (more detail), and -a means "all files" (including hidden ones).

📁 Command 3: cd — Go Somewhere

cd stands for "change directory." It's how you move around your file system.

cd Documents

This moves you into your Documents folder. Try it, then run pwd to confirm where you are.

Key patterns:

  • cd Documents — Go into a folder called Documents
  • cd .. — Go up one level (to the parent folder)
  • cd ~ — Go home (back to your home folder, no matter where you are)
  • cd ~/Desktop — Go directly to Desktop from anywhere

✨ The Tilde Shortcut

The ~ symbol always means "my home folder." So ~/Documents means "the Documents folder inside my home folder." This works from anywhere in your file system.

🆕 Command 4: mkdir — Make a Folder

mkdir stands for "make directory." It creates a new folder.

mkdir my-project

This creates a folder called "my-project" in your current location. You can then cd into it:

cd my-project

💡 Naming Conventions

Avoid spaces in folder names. Use dashes (my-project) or underscores (my_project) instead. Spaces work but require special handling that adds unnecessary complexity.

🗑️ Command 5: clear — Clean Up

clear clears your terminal screen. It doesn't delete anything—it just gives you a fresh view.

clear

Use this when your screen gets cluttered with previous commands and output. Your command history is still there (press the up arrow to see previous commands), but the visual clutter is gone.

📋 The Complete List

Here are your five commands, all in one place:

Command What It Does Example
pwd Shows where you are pwd
ls Lists files and folders ls -la
cd Changes location cd ~/Documents
mkdir Creates a folder mkdir my-project
clear Clears the screen clear
That's really it?

For getting started with Claude Code? Yes. These five commands let you navigate to a project folder and confirm where you are. Claude Code handles everything else—creating files, running code, installing packages. You just need to get to the right place and start the conversation.

🎯 Commands Learned!

You now know the five essential terminal commands. Next, let's practice navigating your file system with confidence.

Topic 0.2 Complete • Up Next: 0.3 – Navigating Folders