Terminal Tutor
Module 01 · Concepts · 12 min read

What is a terminal, really?

Before you type a single command, it helps to know what you're typing into, what's reading it, and who actually does the work. Five minutes here saves an hour of confusion later.

It's a way to talk to your computer in text.

Your computer has always been able to take instructions. A click on a folder is an instruction. So is dragging a file to the Trash. The terminal is the same conversation, just in writing.

When you open Terminal.app on macOSWindows Terminal or PowerShell on Windowsa terminal emulator on Linux, you're opening a window with a blinking cursor. That's it. The cursor is waiting for a sentence. You type the sentence, press Enter, and the computer reads it.

There are four things in the room with you.

When you type ls and press Enter, four different things have a job to do before you see a result. Mixing them up is the single biggest source of "wait, what?" moments.

You
Decide what should happen. Type a sentence in shell language.
~1 word/sec
Terminal
A window. Displays text. Sends your keystrokes onward. Doesn't understand any of it.
draws pixels
Shell
Reads your sentence, figures out what you meant, asks the kernel to do it.
µs
Kernel
The core of the operating system. Actually opens files, lists directories, talks to disks.
ns
Hardware
CPU, RAM, the SSD where your files live, the screen showing this text.
picoseconds
flowchart LR U(["👤 You
(type words)"]) T["Terminal
(a window)"] S(["Shell
bash · zsh · pwsh"]) K[["Kernel
(OS core)"]] H[(Hardware
disk · screen)] U -- "ls" --> T T -- keystrokes --> S S -- "open dir, list it" --> K K -- bytes --> H H -. bytes back .-> K K -. names .-> S S -. formatted text .-> T T -. pixels .-> U classDef you fill:#fde3d1,stroke:#ee8a5e,color:#7a3a18,stroke-width:2px; classDef shel fill:#fbeec2,stroke:#e8b53b,color:#6b4d05,stroke-width:2px; classDef kern fill:#dde3f9,stroke:#8398ea,color:#2a3577,stroke-width:2px; classDef hw fill:#e6e1d8,stroke:#a8a299,color:#4a443c,stroke-width:2px; classDef neutral fill:#ffffff,stroke:#cdc0a3,color:#1d1a14,stroke-width:1px; class U you class S shel class K kern class H hw class T neutral
Figure 1 · The trip a single command takes

The terminal is the dumbest thing in this list. It's just a window that shows text. The shell is the part that understands you. People confuse the two constantly, partly because most macOS users say "the terminal" when they mean "the shell."

Where did "bash" and "PowerShell" come from?

A shell is a program someone wrote. There are many of them, and they have a family tree. Knowing roughly which branch your shell sits on helps when you Google an error and the answer is for a different shell.

flowchart TD UNIX([UNIX · 1971]) SH([sh · Bourne shell · 1977]) BASH([bash · 1989]) ZSH([zsh · 1990]) DOS([DOS · 1981]) CMD([cmd.exe · 1993]) PWSH([PowerShell · 2006]) PWSH7([PowerShell 7 · 2018, cross-platform]) UNIX --> SH SH --> BASH SH --> ZSH DOS --> CMD CMD -.->|"replaced by"| PWSH PWSH --> PWSH7 MAC["macOS default (since 2019): zsh"] LIN["most Linux default: bash"] WIN["Windows default (modern): PowerShell"] ZSH --> MAC BASH --> LIN PWSH7 --> WIN classDef unix fill:#dde3f9,stroke:#8398ea,color:#2a3577; classDef bsh fill:#fbeec2,stroke:#e8b53b,color:#6b4d05; classDef win fill:#dde3f9,stroke:#8398ea,color:#2a3577; classDef use fill:#fde3d1,stroke:#ee8a5e,color:#7a3a18,stroke-width:2px; class UNIX,SH unix class BASH,ZSH bsh class DOS,CMD,PWSH,PWSH7 win class MAC,LIN,WIN use
Figure 2 · A loose family tree of common shells

Two branches. The left side traces back to UNIX, born at Bell Labs in 1971. Almost everything called a "shell" on a Mac or Linux machine is a descendant of sh. The right side is the Microsoft lineage, originally DOS, then cmd.exe, then PowerShell — a deliberate fresh start.

Why this matters for you: bash and zsh are 95% the same. A tutorial written for bash will almost always work in zsh. PowerShell is different language, different conventions, and you can't paste bash snippets into it and expect them to work.

RolemacOSWindowsLinux
Terminal app Terminal.app, iTerm2 Windows Terminal GNOME Terminal, Konsole, Alacritty…
Default shell zsh PowerShell (pwsh) bash
Family UNIX / POSIX Microsoft / .NET UNIX / POSIX
Open Terminal ⌘ Space → "Terminal" ⊞ Win → "Terminal" Ctrl Alt T

The filesystem is a tree.

Every file on your machine has a single home, reached by a path of folders. Your job in the terminal is to know which folder you're currently standing in — and to move around the tree.

flowchart TD R["/" --- "root (Mac/Linux) or C:\ (Windows)"] U[Users] EVA[eva  ←  you live here] DESK[Desktop] DOCS[Documents] DOWN[Downloads] PROJ[my-project] HELLO[hello.txt] NOTES[notes.md] R --> U U --> EVA EVA --> DESK EVA --> DOCS EVA --> DOWN DESK --> PROJ PROJ --> HELLO PROJ --> NOTES classDef dir fill:#d6ead8,stroke:#6fb286,color:#1e5435; classDef root fill:#fff,stroke:#cdc0a3,color:#1d1a14; classDef home fill:#fde3d1,stroke:#ee8a5e,color:#7a3a18,stroke-width:2px; classDef file fill:#fff,stroke:#cdc0a3,color:#5e564a; class R root class U,DESK,DOCS,DOWN,PROJ dir class EVA home class HELLO,NOTES file
Figure 3 · A snippet of the file tree, with you standing in your home folder

Two ideas come out of this picture:

Anatomy of a command.

Every command you type has the same shape. Once you see the shape, every other command becomes pattern-matching instead of memorization.

$ ls command -la flags ~/Documents argument
Figure 4 · Command · flags · arguments
PS> Get-ChildItem command (cmdlet) -Force parameter ~\Documents argument
Figure 4 · Cmdlet · parameter · argument

Most commands accept --help on Mac/Linux, and -? or Get-Help on PowerShell. When in doubt, ask the command what it can do.

Same idea, different words.

The reason this course teaches concepts first: once you know the concept, the command name is just a label. Here are the ten labels that change between operating systems. The idea is identical in each row.

What you want to do macOS / Linux Windows (PowerShell)
Where am I? pwd pwd or Get-Location
What's in this folder? ls ls, dir, or Get-ChildItem
Move into a folder cd folder cd folder
Go back one level cd .. cd ..
Go home cd ~ cd ~ or cd $HOME
Make a folder mkdir my-stuff mkdir my-stuff
Make an empty file touch notes.txtNew-Item notes.txt
Show file contents cat notes.txt cat notes.txt or Get-Content
Copy a file cp a.txt b.txt cp a.txt b.txt or Copy-Item
Move / rename mv old new mv old new or Move-Item
Delete a file rm note.txt rm note.txt or Remove-Item
Clear the screen clear clear or cls

When something goes wrong.

Errors in the terminal are not punishments. They are the kernel or the shell telling you, often quite precisely, what they couldn't do. Three you'll see in your first week:

What it says Who said it What it means
command not found: lss Shell The shell looked everywhere for a program called lss and couldn't find one. Usually a typo.
No such file or directory Kernel The shell asked the kernel for that path. The kernel checked. Nothing there.
Permission denied Kernel The file exists, but you're not allowed to do that to it. The kernel enforces this.
What it says Who said it What it means
The term 'lss' is not recognized as a name of a cmdlet… Shell PowerShell looked through its command table and your $PATH. No lss anywhere. Usually a typo.
Cannot find path '…' because it does not exist. Kernel PowerShell asked Windows for that path. Windows checked. Nothing there.
Access to the path '…' is denied. Kernel The file exists, but your user account doesn't have permission. Run a new shell as Administrator if you really need to.

Read errors the way you'd read a sign on a door. They're short, literal, and almost always honest about what happened.

next · do
Open the Playground →

Type your first commands in a safe sandbox.

next · drill
Try Recall Mode →

Test what stuck. Five scenarios, three minutes each.