LARP it
Mission. You’ve just sat down at a stranger’s computer in a dark server room. Before you touch anything you need two facts: who the machine thinks you are, and where you are. No mouse. Only the keyboard.
Open a terminal:
- macOS: press
Cmd + Space, typeTerminal, press Enter. - Linux: press
Ctrl + Alt + T, or find “Terminal” in your apps. - Windows: open Git Bash or Ubuntu (WSL) from the Start menu.
You’ll see a short line ending in $ or % and a blinking cursor. That’s the prompt. Type
these, pressing Enter after each one:
whoami
pwd
date
Say it out loud like the movie: “I’m in.”
Learn it
The window is a terminal. Inside it runs a program called a shell (usually bash or
zsh). The shell waits at the prompt, reads the line you type, runs it, prints the result and
waits again. That loop is the whole idea.
| You typed | What it does |
|---|---|
whoami |
prints the name of the user you’re logged in as |
pwd |
print working directory: the folder the shell is in right now |
date |
prints the current date and time, a small program like the others |
Every command is a small program. The shell finds it by name, runs it and hands you its output.
pwd probably printed something like /Users/you or /home/you. That’s your home folder,
the place every new terminal starts.
Two keys that make you look fast:
- Up arrow brings back the previous command.
- Tab finishes a name for you when it’s unambiguous.
Check it
- Run
whoamiandpwd. Does the last part of thepwdoutput match your user name? - Press the up arrow three times. Which command comes back?
- Type
datand press Tab. What happens?