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.
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.
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.”
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.
$ (or %) is the prompt — you type after it.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:
Almost every command has the same three parts. Once you see the pattern, every command looks familiar. Tap a coloured part:
This command means “list, in detail, what’s inside Documents.” Tap each coloured word to see its job.
pwdThe 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 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.
pwd tells you which folder you’re currently in. “Directory” = folder.lsls (“list”) shows what’s inside your current folder:
Add an option to change how it lists:
ls -l — a detailed list (dates, sizes, one per line).ls -a — all items, including hidden ones (names starting with a dot).ls -la — both together. Options can be combined.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.
ls lists what’s in the current folder; ls -l gives detail, ls -a shows hidden items.cd and the magic Tab keycd means “change directory” — it walks you into a different folder:
Four little shortcuts you’ll use forever:
cd .. — go up one folder (.. means “the folder above”).cd ~ — jump home (~, the tilde, always means your home folder).cd / — go to the very top of the disk.cd on its own — also jumps home.cd Doc, hit Tab, and it becomes cd Documents/. This saves typos and tells you the name exists. Use it constantly — every pro does.cd moves you around; .. = up, ~ = home. Press Tab to auto-finish names — your new best friend.Now you create things. Three commands do almost everything:
mkdir myfolder — make a new folder called myfolder (“make directory”).touch notes.txt — create a new, empty file.echo "Hello" > hello.txt — create a file with words in it. echo just prints text; the > means “put that into this file instead of on screen.”That > is powerful and worth remembering: it redirects output into a file. Two of them, >>, means “add to the end” rather than “replace.”
mkdir makes folders, touch makes empty files, and echo "text" > file makes a file with text in it.cat file.txt — print a file’s contents to the screen so you can read it.cp file.txt copy.txt — copy a file.mv file.txt folder/ — move a file into a folder.mv old.txt new.txt — the same command renames (moving to a new name in the same place).rm file.txt — remove (delete) a file.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.cat reads, cp copies, mv moves/renames, rm deletes. rm is forever — look twice.You’ll never memorise everything — nobody does. You just need to know how to ask:
man ls — opens the manual for any command (press q to quit the manual).ls --help — many commands show a quick summary this way.And four safety habits worth building from day one:
clear — wipes the screen clean when it gets cluttered.sudo — means “do this as the all-powerful administrator.” It’ll ask your password and can change anything. Only use it when a trusted instruction tells you to, and read the line carefully first.man and --help explain any command; Ctrl+C stops trouble; ↑ recalls commands; treat sudo with care.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.
mkdir mysitecd mysiteecho "<h1>Hello...</h1>" > index.htmlcat index.htmlopen index.html 🎉help for the full list. Also try pwd, ls, cd .., ↑ for history.
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”).
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.
sshThe command is ssh, then who you are and where you’re going, joined by an @:
That’s ssh username@the server’s address (an IP number or a name like server.designm8.uk). What happens next, the first time:
yes.exit when you’re done to hang up and come back to your Mac.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.
ssh you@server logs you in; first time say yes, enter the (invisible) password, work away, then exit. Keys are the safer upgrade.Instant feedback on each.
pwd, ls, cd — you’ll recognise everything.