The Terminal, from scratch

Never typed a command in your life? Perfect. By the end you’ll navigate your Mac by keyboard, build a working web page by hand, and log into a server — with a real practice terminal to try it all safely.

Part 1 · Lesson 1

What the Terminal is

Normally you use your Mac by pointing and clicking. The Terminal is a second way to use it: you type instructions instead. That’s the entire idea. A black window, a blinking cursor, you type a line, press Return, and the Mac does it.

People find it intimidating only because it’s unfamiliar — there are no buttons to reassure you. But it’s just a conversation: you say a command, the computer replies. Nothing more mystical than that.

Clicking vs typing: imagine ordering coffee by pointing at a picture menu (clicking), versus just saying “flat white, oat milk” (typing). Pointing is easy to start with; speaking is faster and more precise once you know the words. The Terminal is you learning to speak to your Mac.

Takeaway: the Terminal is a way to control your Mac by typing commands instead of clicking. It’s a conversation, not a minefield.
Part 1 · Lesson 2

Opening it on your MacBook Air

Two easy ways:

A window opens with a line that looks something like this — the prompt. It’s the computer saying “ready when you are.”

you@MacBook-Air ~ %

That % (or sometimes $) marks where your typing goes. Everything before it just tells you who you are and where you are. In this course we’ll show it as $, the traditional symbol — don’t type the $ itself, only what comes after.

Takeaway: open it with +Space → type “Terminal”. The $ (or %) is the prompt — you type after it.
Part 1 · Lesson 3

When to use it — and when not to

You do not need the Terminal for everyday life. Email, browsing, documents — keep clicking. Reach for the Terminal when it’s genuinely the better tool:

Healthy respect, not fear: the Terminal does exactly what you say, instantly, with no “are you sure?” and often no undo. That’s its power and its only danger. We’ll flag the few commands to be careful with — and you’ll practise everything in a safe sandbox first.
Takeaway: use it for technical instructions, servers, bulk jobs and dev work. Respect it — it does exactly what you type, at once.
Part 1 · Lesson 4

The shape of a command — tap each part

Almost every command has the same three parts. Once you see the pattern, every command looks familiar. Tap a coloured part:

$ ls -l Documents

Tap a part above ↑

This command means “list, in detail, what’s inside Documents.” Tap each coloured word to see its job.

Takeaway: command + options + target. The command is the verb, the option (a dash-letter) tweaks how, the argument is what it acts on.
Part 2 · Lesson 5

“Where am I?” — pwd

The Terminal is always “standing” inside one folder — your current folder. Since you can’t see it like a Finder window, the first useful command simply asks: where am I right now?

$ pwd/Users/you

pwd stands for “print working directory” (“directory” is just the old word for “folder”). It answers with the full path from the top of the disk down to where you’re standing. Here, you’re in your home folder, /Users/you.

It’s the “You are here” dot on a shopping-centre map. Before you go anywhere, it helps to know where you’re standing.
Takeaway: pwd tells you which folder you’re currently in. “Directory” = folder.
Part 2 · Lesson 6

“What’s here?” — ls

ls (“list”) shows what’s inside your current folder:

$ lsDesktop Documents Downloads notes.txt

Add an option to change how it lists:

That’s the rhythm of the Terminal: a short verb, sometimes a dash-option, sometimes a target. You’ll use pwd and ls constantly, just to keep your bearings.

Takeaway: ls lists what’s in the current folder; ls -l gives detail, ls -a shows hidden items.
Part 2 · Lesson 7

Moving around — cd and the magic Tab key

cd means “change directory” — it walks you into a different folder:

$ cd Documents$ (you’re now inside Documents — check with pwd)

Four little shortcuts you’ll use forever:

The single best beginner trick — Tab completion: start typing a name and press Tab. The Terminal finishes it for you. Type cd Doc, hit Tab, and it becomes cd Documents/. This saves typos and tells you the name exists. Use it constantly — every pro does.
Takeaway: cd moves you around; .. = up, ~ = home. Press Tab to auto-finish names — your new best friend.
Part 3 · Lesson 8

Making folders and files

Now you create things. Three commands do almost everything:

$ mkdir project $ echo "my first file" > project/readme.txt

That > is powerful and worth remembering: it redirects output into a file. Two of them, >>, means “add to the end” rather than “replace.”

Takeaway: mkdir makes folders, touch makes empty files, and echo "text" > file makes a file with text in it.
Part 3 · Lesson 9

Look, copy, move, rename, delete

The one to respect: rm. Delete in the Terminal is permanent — it does not go to the Trash, and there is no undo. Read the line twice before pressing Return. And treat rm -rf (delete a folder and everything in it, no questions) as a loaded tool — powerful, occasionally necessary, never typed on autopilot.
Takeaway: cat reads, cp copies, mv moves/renames, rm deletes. rm is forever — look twice.
Part 3 · Lesson 10

Getting help & staying safe

You’ll never memorise everything — nobody does. You just need to know how to ask:

And four safety habits worth building from day one:

Takeaway: man and --help explain any command; Ctrl+C stops trouble; recalls commands; treat sudo with care.
Part 4 · Lesson 11

Build something that works — for real

Time to do it. Below is a real practice terminal — it behaves like the Mac Terminal but it’s a safe sandbox: you can’t break anything. Follow the five steps to build a working web page with your bare hands. Tap a step’s command to drop it in, or type it yourself, then press Return.

  1. Make a folder: mkdir mysite
  2. Go into it: cd mysite
  3. Create a web page: echo "<h1>Hello...</h1>" > index.html
  4. Check it worked: cat index.html
  5. Open it: open index.html 🎉
practice — Terminal
Try help for the full list. Also try pwd, ls, cd .., for history.
Takeaway: you just navigated, created a folder, wrote a file and opened it — entirely by typing. That’s the whole game. Everything else is more of the same.
Part 5 · Lesson 12

Reaching a server — what SSH is

Everything so far controlled your Mac. But a server (your website’s computer) sits in a data centre with no screen and no mouse. So how do you work on it? You open a Terminal on it, from your own Mac, using SSH (“Secure Shell”).

🖥️
Your MacBook
— SSH →
🏢
Your server
(far away)

Once connected, your Terminal is now “standing” on the server. The very same commands — pwd, ls, cd — work, but they’re acting on the server’s files, not your Mac’s. It’s the exact skill you just learned, pointed at a different computer.

SSH is a secure phone line into your server’s Terminal. You dial in, and from then on you’re typing on the machine at the other end — safely, because the whole line is scrambled so nobody can listen in.
Takeaway: SSH opens a secure Terminal on a remote server from your Mac. The commands are identical — they just act on the server.
Part 5 · Lesson 13

Actually connecting with ssh

The command is ssh, then who you are and where you’re going, joined by an @:

$ ssh chris@203.0.113.10

That’s ssh username@the server’s address (an IP number or a name like server.designm8.uk). What happens next, the first time:

Passwords vs keys. Typing a password each time works, but the safer, tidier way pros use is an SSH key — a matched pair of files (one secret on your Mac, one public on the server). Set it up once and you log in with no password at all, more securely. The one rule: your private key never leaves your Mac and is never shared. Ever.

Two safety musts: double-check the address before connecting (you’re about to control a real machine), and never paste your private key or password into a website, email or chat — not even if something claims it needs it.
Takeaway: ssh you@server logs you in; first time say yes, enter the (invisible) password, work away, then exit. Keys are the safer upgrade.
Check yourself

A quick six-question quiz

Instant feedback on each.

You did it. From never typing a command to building a web page and understanding SSH. Open the real Terminal on your Mac and try pwd, ls, cd — you’ll recognise everything.