Getting Started · Chapter 1
Take Your First Step: Open the Terminal
In this chapter, we'll actually open that "black window" we mentioned in Chapter 0. We'll show you how on all three systems, then walk you through the five most useful lifesaver commands. Just follow along — there's nothing to memorize.
1.1 What Is a Terminal? Why Do Engineers Love Typing Commands?
Normally, you use your computer by clicking icons with your mouse: to open a folder, you double-click that little yellow folder icon. It's intuitive, but it has a limit — you can only do things that have a button on the screen.
The terminal does it differently: you type commands. Type a line, press Enter, and the computer does it. It looks plain (usually just a dark window with a blinking cursor), but it's powerful, because:
- Precise: a single line can spell out exactly which file to act on and what to do to it.
- Repeatable: you can save a sequence of commands and run it again, instead of clicking through it by hand every time.
- Claude Code lives here: it's a terminal program, so you need to learn how to open this door first.
Another way to think about it
Clicking icons is like "pointing at the pictures on a restaurant menu to order"; typing commands is like "telling the chef directly how you want it made." The second way takes some learning at first, but you can order so much more.
1.2 Opening It on Windows: How Are PowerShell, CMD, and WSL Different?
Windows is a bit special: it has three common terminals. They have different names, but they're all windows for "typing commands to the computer." Let's get to know them:
PowerShell (recommended for beginners)
The terminal Windows now promotes, and the most full-featured. Search for "PowerShell" in the Start menu and you'll find it.
CMD (Command Prompt)
An older one. It works, but it's more bare-bones. Search "cmd" and it'll show up.
WSL (Linux inside Windows)
An advanced option: it runs a Linux environment inside Windows. Many developers love it, but it needs extra setup, so beginners can leave it for later.
How to open PowerShell
- Press the Windows key at the bottom-left of your keyboard (or click the Start button).
- Just start typing to search for
PowerShell. - Click "Windows PowerShell" to open it.
How can I tell which one I've opened?
Look at the title bar at the top of the window, and at the "prompt" string in front of the cursor: PowerShell usually starts with PS C:\Users\YourName> (notice the PS at the front); CMD shows C:\Users\YourName> (no PS). If you see PS at the start, you're in PowerShell.
1.3 Opening It on Mac: Where Is Terminal?
On a Mac, the terminal app is simply called "Terminal," and it's already installed. The fastest way to open it is with a Spotlight search:
- Press Command (⌘) + Space, and a search box pops up in the middle of the screen (that's Spotlight).
- Type
Terminal. - Press Enter, and Terminal opens.
Another way
You can also find it under Applications → Utilities → Terminal. But Spotlight (⌘ + Space) is almost always the fastest, so it's worth making it a habit.
1.4 Opening It on Linux
If you're on Linux, you probably already know where the terminal is, so we'll keep this brief. Most desktop environments (like Ubuntu's GNOME) offer two ways to open it:
- Keyboard shortcut: press
Ctrl + Alt + T, and most distributions will open a terminal right away. - From the application menu: search for "Terminal" and open it.
1.5 Five Lifesaver Commands
Now that the terminal is open, let's practice the five most common commands. They're like basic moves — walking, turning — and once you know them, you can "get around" inside your computer. For each command below, switch to your system with the tabs and just type along.
Pick your system once
Every example below has Windows / Mac / Linux tabs in its top-right corner. Switch any one of them and every example on the page switches too — and it'll even remember your choice when you move to other chapters. Pick your system first, then just follow that tab as you read on.
① cd — Step into a folder (change directory)
To "step into" a folder from where you are now, use cd followed by the folder's name. It's the same on all three systems:
# Step into the folder named Documents
cd Documents
# Step into the folder named Documents
cd Documents
# Step into the folder named Documents
cd Documents
To go back up one level (out to the folder that contains this one), type cd .. (the two dots mean "one level up").
② ls / dir — See what's inside
To see which files and subfolders the current folder contains, use this command. Note that Windows CMD uses dir, while Mac / Linux / PowerShell use ls:
# PowerShell can use ls
ls
# On classic CMD, use dir instead
dir
# List the contents of the current folder
ls
# For more detail (including hidden files), add a flag
ls -la
# List the contents of the current folder
ls
# For more detail (including hidden files), add a flag
ls -la
③ pwd / cd — Where am I right now?
Wandered off and got lost? This command prints "the full path of where you are now," like tapping "your location" on a map:
# PowerShell supports pwd too
pwd
# On classic CMD, type cd (with nothing after it)
cd
# Print the full path of where you are now
pwd
# Print the full path of where you are now
pwd
④ mkdir — Make a new folder (make directory)
To create a new folder, use mkdir followed by the name you want to give it. It's the same on all three systems:
# Create a folder called my-project
mkdir my-project
# Create a folder called my-project
mkdir my-project
# Create a folder called my-project
mkdir my-project
⑤ Clear the screen (clear / cls)
Screen crammed with text and making your eyes swim? Clear it out. Windows CMD uses cls; everything else uses clear:
# Classic CMD uses cls
cls
# PowerShell accepts either one
clear
# Clear the screen (you can also press Control + L)
clear
# Clear the screen (you can also press Control + L)
clear
Watch out for capitalization and spaces
The terminal can be very "fussy": cd Documents and cd documents are different on some systems, and there must be a space between the command and the name. If you mistype, it usually replies with an error message — don't panic, just read it carefully and type it again.
1.6 The Most Important Move: Stepping into Your Project Folder
This is the most important move in the whole chapter. From now on, whenever you use Claude Code, the first thing you'll almost always do is "use cd to step into your project folder," so it knows which project to work on.
Suppose your project sits under the "Documents" folder and is named my-project. Here's how you'd step into it:
# Go all the way into my-project under Documents
cd Documents\my-project
# Once there, double-check you're in the right place
pwd
# Go all the way into my-project under Documents
cd Documents/my-project
# Once there, double-check you're in the right place
pwd
# Go all the way into my-project under Documents
cd Documents/my-project
# Once there, double-check you're in the right place
pwd
Mind the slash direction
The slash leans different ways on each side: Windows traditionally uses a backslash \, while Mac and Linux use a forward slash /. (Fun fact: Windows actually accepts forward slashes most of the time now, but learning each one's usual style first keeps things from getting confusing.)
A super handy trick: "drag" the folder into the terminal
Can't remember that long path? Here's a shortcut: type cd and a space, then use your mouse to drag your project folder right into the terminal window and let go — it fills in the full path for you automatically, and you just press Enter to get there. Mac, Windows, and Linux mostly all support this trick; it's a must-learn for beginners.
Congratulations — you can now use the terminal
Opening the terminal, moving around with cd, looking around with ls, and finding your way with pwd when you're lost — these are the foundation for everything that follows. In the next chapter (coming soon), we'll formally install Claude Code and bring that "engineer who lives inside your computer" on board.