Section 0
The handful of basics every other section quietly assumes you already know. Nobody is born knowing these. Twenty minutes here saves you being lost later.
You are about to open a window that looks like something from a film about hackers. It is black, it has no buttons, and it is genuinely intimidating the first time.
So, a promise:
The Terminal is a window where you type instructions instead of clicking them. That's the entire idea.
You already know how to tell a computer to do things by clicking — double-click a folder, drag a file to the bin. The Terminal is the same actions, typed. Typing is uglier but it's precise, it's much faster once you know it, and — importantly for you — it's something you can paste to an AI and something an AI can hand back to you. You can't paste a mouse click.
terminal.Yours will have your own name in it. That blinking block after the % is where what you type will appear.
That line is called the prompt. It's the computer saying "I'm ready, what would you like?" — it just says it in a very terse way.
powershell, press Enter. Same idea, slightly different words on screen. Everything in these pages works in both unless it says otherwise.
"Running a command" sounds technical. It means: type some words, press Enter, read what comes back. That's all it has ever meant.
Try it. Type this exactly, then press Enter:
whoami
Your computer's username. Then a fresh prompt underneath, waiting for the next thing.
You just ran a command. That's the skill. Everything else in these pages is the same move with longer words.
Try one more:
date
Neither of those changed anything. They asked a question and got an answer. A surprising amount of what you'll do is exactly this.
Every dark box on these pages has a Copy button in its top-right corner. You don't need to retype any of it — and you shouldn't, because one wrong character means it won't work.
The Terminal is famously bad at celebrating. Here's how to read it.
Usually you get either the thing you asked for, or nothing at all, and then a fresh prompt.
Nothing was said, and that's the point. Most commands that do something say nothing when they succeed. Silence means "fine, done." You'll get used to it.
You get a line of text that's clearly complaining.
Read it slowly: command not found. It doesn't know the word whoamii — because of that extra i. Typo. Retype it and move on.
Error messages look hostile but they're trying to help. The last line is nearly always the useful one.
This is the concept that trips up almost everyone at the start, so it's worth slowing down for.
When you use Finder, you can see which folder you're looking at. In the Terminal you're also always inside one particular folder — you just can't see it. Commands happen in that folder. Ask to list the files and you get that folder's files, not your whole computer's.
Three commands manage this entirely.
pwd
That's your home folder. Read it right to left: a folder called yashina, inside a folder called Users, at the very top of the drive. Those slashes are just the separators between folder names — like the arrows in Finder's path bar.
ls
The same folders you'd see in Finder. Because it is the same thing — a different window onto the identical files. ls is short for "list".
cd Desktop
cd means "change directory", and "directory" is just an older word for folder. You'll see both words used for the same thing forever.
Look at the prompt — it changed from ~ to Desktop. It tells you where you are, if you know to look. That ~ symbol is shorthand for your home folder.
To go back up one level:
cd ..
Two dots means "the folder containing this one". Like the back arrow in Finder.
pwd and ls to get your bearings before assuming anything is broken.
Typing folder names is tedious and easy to get wrong. So don't.
Type cd — with a space after it — then drag a folder from Finder into the Terminal window and let go. The full path types itself. Press Enter.
This one trick removes most early frustration.
You know what a file is. The part worth spelling out is the ending.
| Ending | What it holds |
|---|---|
.html | A web page |
.css | How a web page looks — colors, spacing, fonts |
.js | Things a web page does when you click |
.md | Plain writing with simple formatting. Your README and AGENTS.md. |
.db | A database |
.png .jpg | Pictures |
The ending isn't decoration — it's how your computer decides what a file is. Rename notes.txt to notes.html and your browser will now try to open it as a web page.
index.html and shows that. It's the "front page" of any folder. That's why every web project has one, and why the pages on this site live in folders each containing an index.html.
Which causes real confusion, because you'll swear you named something correctly. Turn endings on once and never think about it again:
Now you can see what your files actually are.
You will get stuck. Everyone does, permanently, forever — the difference between a beginner and an expert is mostly how quickly they get unstuck.
Here's the method:
I was trying to <what you wanted>.
I ran this command:
<the command>
And got this:
<the whole error>
What went wrong, and what should I do?
Ten minutes. Nothing here can break anything.
whoami, then date, then pwd. Three commands, three answers. You've now used a terminal.ls, then cd Desktop, then ls again. Watch the answer change. You moved.mkdir my-first-website. Nothing will be said. Run ls to see it appeared — then look at your actual Desktop and watch it be there too. Same computer, two windows onto it.lss and press Enter. Read the complaint. Errors are just sentences.cd with a space, drag any folder from Finder into the window, press Enter. Then pwd to confirm you're there.That's the foundation. Section 1 will make a good deal more sense now.
Next: putting a website on the internet →