01step · watch first
A quick primer before you touch the terminal.
A quick primer on the Linux command line — the same commands you'll use to hunt down the flag inside the lab. Skim the summary, then move on to the animated simulation to see the same ideas in action.
≡
Summary
what to remember
- 1The cursor is a question. Every line waits for you to type a command, press Enter, and read the answer. There's no "submit" button — just the blinking cursor.
- 2Three commands cover most of it.
lsshows what's in a folder.cdmoves you into a folder.pwdtells you which folder you're in. Get these down before anything else. - 3Hidden files start with a dot.
lsskips them;ls -ashows them all. Your home folder is full of them. - 4find searches every folder. When you don't know where a file lives,
find / -name "*flag*"checks every folder for a matching name. - 5grep finds the words.
grep -r 'pattern' /pathreads inside every file under /path and prints any line that contains the word you asked for. Chain two of these together and you've solved most beginner labs.
?
Quick check · before you continue
1 question · pick one
QYou're dropped into a fresh Linux terminal and told "the flag is hidden somewhere on this machine." Which command is the most useful first move?