1. Typing instead of clicking
Everything you do by clicking, you could do by typing instead. Open a folder, copy a file, rename fifty photos, start a program. The terminal is the window where you type those instructions, one line at a time, and the computer types back.
That sounds like the slow way round, and for opening one folder it is. It stops being the slow way the moment there are fifty folders, or you have to do the same job every Monday, because a typed command can be saved, repeated and sent to somebody else. You cannot email somebody a mouse movement.
2. Why is it called a "terminal"?
Because it was the end of the line. Same word as a bus terminus, and the same word as when a program terminates: the end.
In the 1960s and 70s a computer was a room. One extremely expensive machine, and dozens of people who all needed a turn on it. So you did not sit at the computer, you sat at a terminal: a keyboard and a screen (or a printer) on the end of a long cable, with the actual computer somewhere down the corridor.
The terminal itself could not compute anything. It sent your keystrokes down the wire and displayed whatever came back. That is exactly why they were called dumb terminals, and it's not an insult: all the thinking happened at the other end.
The word never went away. In the Networks lesson you will meet an endpoint: a device sitting at the end of a network connection. Same idea, sixty years later, with the cable replaced by wifi.
Check your understanding: Why were the first terminals called "dumb"?
A dumb terminal was a keyboard and a display on the end of a wire. Every calculation happened on the big computer down the corridor, and the terminal just carried your typing there and painted the answer.
3. It used to print on paper. That's why it's print
Before screens were cheap, a terminal was an electric typewriter. You typed a line, it clattered off down the wire, and the computer's answer was typed back onto a roll of paper. The famous one was the Teletype Model 33, from 1963, and programmers worked on machines like it for years.
That is not a bit of trivia you can safely forget, because you use it every single lesson:
print()is named after an actual printer. When you writeprint("Hello")in Python, you are using the word that meant the machine physically printed your text onto paper. The name outlived the paper by fifty years.\nis a lever. The line feed rolled the paper up one line. The carriage return shoved the print head back to the left margin. Two separate physical actions, which is why Windows text files still end their lines with both (\r\n) and Mac and Linux with just one (\n).- Linux and macOS still call terminals
tty. Short for teletype. Open a terminal on a Mac, typetty, and it will answer with something like/dev/ttys003. You are being told which teletype you are sitting at, on a machine that has never seen one.
Check your understanding: Why is Python's output command called print?
Early terminals were electric typewriters, so the computer's reply was printed onto a roll of paper. The screen replaced the paper, the word stayed. print() does not touch your printer.
4. From paper to glass
Screens arrived and terminals became glass teletypes: same job, no paper, no noise, no forest destroyed. The most famous was the DEC VT100 in 1978, and it mattered so much that we are still copying it today.
- Colours. The VT100 understood short bursts of odd-looking characters that meant "go red now" or "move the cursor up two lines". Those are called escape codes, and they are still how a terminal does colour in 2026.
- 80 characters wide. A VT100 screen was 80 columns across, because the punched cards before it were 80 columns across. That is why so much code is still written to fit in 80 characters a line, on screens the size of a door.
- The one on your laptop is a copy. Terminal, iTerm, PowerShell, the black window in VS Code: they are terminal emulators, software pretending to be a hardware terminal from 1978. There's no terminal in your laptop. There's a program drawing one.
5. Terminal or shell? They are different things
People use the two words for the same window, and they are not the same thing.
- The terminal is the window: the black rectangle, the font, the cursor, the scrollbar. It shows characters and collects your keystrokes. That's all it does.
- The shell is the program running inside it that actually reads your command and does something about it. On a Mac that is usually
zsh, on Linux usuallybash, on WindowsPowerShellor the oldercmd.
The window is the letterbox; the shell is the person who reads the post. Now look at what the shell prints while it waits for you, which is called the prompt:
sam@laptop:~/Homework$
- sam
- who you are logged in as
- laptop
- which machine you are on
- ~/Homework
- which folder you are standing in.
~is your home folder - $
- the shell saying it is your turn to type
C:\Users\sam\Homework>
- C:\Users\sam\Homework
- the same folder, spelled the Windows way
- >
- the same "your turn to type"
Everything before the $ or the > is the shell telling you where you are. Read it before every command, and half of all terminal confusion disappears: nearly every "it says no such file" is really "you are not standing in the folder you thought you were".
Check your understanding: Which part is the shell?
The terminal is the window that shows characters. The shell is the program inside it that understands cd and dir and decides what happens. You can run the same shell in a different terminal, and the same terminal can run a different shell.
6. Terminal or Python shell? Also different
If you use IDLE at school, you have already met a window with a prompt in it, and it's not a terminal. Two different prompts, two different languages:
| A system terminal | The Python shell (IDLE, or the Sandbox here) | |
|---|---|---|
| Speaks | Commands for the whole computer: cd, dir, python | Python, and only Python |
| Prompt | $ or > | >>> |
Typing print("hi") | "command not found", it isn't a computer command | Prints hi |
Typing dir | Lists the folder | An error, unless you mean Python's own dir() |
| It is | Text, and the whole machine behind it | A friendlier, Python-only place built for learning |
They meet in one place: from a terminal you can type python hello.py and the terminal starts Python for you, hands it your file, and prints whatever your program prints. IDLE's Run button is doing the same job with a button on it. That's the whole difference: the terminal drives the computer, the Python shell drives Python.
7. Have a go
This is a pretend terminal. Nothing in it is real, so nothing you type can go wrong. Type help and press Enter, then have a poke around. Press the up arrow to bring back your last command, the way a real one does.
Three things to do in there:
- List what's inside
Homework/Term1 - Read
notes.txt - Make the computer say something back with
echo
All three. You have just navigated a file system without touching a mouse.
A pseudoterminal is a genuine thing with a job: when your Terminal app opens, the operating system hands it a pretend cable, so the shell can carry on believing it is wired to a 1978 machine with a keyboard on the end. The shell is fooled on purpose, and everything it does is real. Type tty in a real terminal and the name it prints is one of those.
This one is not fooling any shell, because there isn't one. There's no operating system on the other end and no files: just a web page reading your words and deciding what to print. The right word is a simulator. A flight simulator is not a pseudo-aeroplane.
8. The cheat sheet
The commands split into two families, because Windows grew up separately from macOS and Linux. Learn one column, and recognise the other.
| What you want | macOS & Linux | Windows |
|---|---|---|
| Where am I? | pwd | cd |
| What is in this folder? | ls | dir |
| Go into a folder | cd Homework | cd Homework |
| Go back out one | cd .. | cd .. |
| Print a text file | cat notes.txt | type notes.txt |
| Make a folder | mkdir Term3 | mkdir Term3 |
| Copy a file | cp a.txt b.txt | copy a.txt b.txt |
| Wipe the screen | clear | cls |
| Run a Python file | python3 hello.py | python hello.py |
Two habits worth stealing on day one: press Tab to finish a name you have started typing (the shell knows what is in the folder, and it never makes typos), and press the up arrow to bring back the command you just ran instead of typing it again.
9. Never paste what you cannot read
Everything above is safe. Here is the one rule that keeps it that way.
A command does exactly what it says, instantly, to your real files, without an "are you sure?" and usually without an undo. Deleting a folder full of work is one short line. So is downloading a program from a stranger and running it.
This is why a very old scam still works: a website or a video says "your computer is slow, just paste this into the terminal to fix it". The command is deliberately long and full of things that look technical. People paste it. It's ransomware.
Check your understanding: A video says to fix your slow laptop by pasting a long command into the terminal. What do you do?
Typing it by hand is exactly as dangerous as pasting it: the computer cannot tell the difference. Views and likes are not a safety check either. The only real check is understanding the command, or asking somebody who does.
Module test
Five questions on the terminal. Your best score shows on your My Progress page.
1. Where does the name "terminal" come from?
2. Why is Python's print() called print?
3. What is the difference between a terminal and a shell?
4. You see the prompt >>>. What are you typing into?
5. On macOS or Linux, which command lists what is in the folder you are standing in?
Glossary
- Terminal
- The window that shows text and collects your keystrokes. Named after the terminals on the end of a cable to a shared computer.
- Terminal emulator
- The program on your laptop that draws a terminal. Terminal, PowerShell and the panel in VS Code are all emulators of hardware from the 1970s.
- Dumb terminal
- A terminal with no computing power of its own: it sent keys down the wire and displayed the reply.
- Teletype (tty)
- An electric typewriter used as a terminal. Linux and macOS still name terminal devices after them.
- Shell
- The program that reads your commands and runs them: zsh, bash, PowerShell, cmd.
- Prompt
- What the shell prints while it waits for you. It usually says who you are and which folder you are standing in.
- Python shell
- A prompt that only understands Python, like IDLE's window or the
>>>you get by typingpython. Not the same as a terminal. - Pseudoterminal
- The pretend cable the operating system gives a terminal emulator so the shell believes it is talking to real hardware.
- Escape code
- A short burst of characters that means "change colour" or "move the cursor". How terminals have done colour since the VT100.