Linux basics
The handful of shell commands you need to move around, read files and search — the ground every CTF stands on.
- Track
- Basics
- Estimated time
- 20 min
- Level
- Beginner
Your progress in this track0%
Before this lesson
Most servers, tools and CTF challenges live on Linux, and you drive it from a text shell. You do not need to be an expert — a dozen commands cover almost everything in the challenges on this platform.
Moving around and reading
pwd # print the current directory
ls -la # list everything here, including hidden files
cd evidence # change into the evidence directory
cat note.txt # print a file
less big.log # page through a large file (q to quit)Hidden files start with a dot and are easy to miss — ls -la shows them, and a surprising number of CTF flags hide in a .secret or .bash_history.
Searching and inspecting
grep -r "HTF{" . # search every file here for the flag format
strings binary.bin # pull readable text out of a binary file
file mystery # guess what kind of file something is
xxd data.bin | head # view the raw bytes as hex
base64 -d token.txt # decode base64grep, strings and file are the three you will reach for constantly: find text, pull text out of binary, and identify an unknown file before you waste time on it.
Labs
The labs for this lesson are in preparation.
