LAB 00 Intro to Linux // about 15 minutes

Get moving in Linux.

This is your first fifteen minutes in a Linux terminal — no setup, no install, nothing to break. You’ll open a real Linux shell right in your browser, run a handful of commands, and walk away able to find your way around. A terminal is just a text window where you type commands instead of clicking; a shell is the program inside it that reads what you type and runs it.

“I’m doing a (free) operating system (just a hobby, won’t be big and professional like gnu)…”— Linus Torvalds, announcing Linux to the world, 25 August 1991. That hobby now runs most of the internet, every Android phone, and the servers you’ll defend.
Launch Linux terminal → Opens in a new tab — keep this page beside it and follow along. Give it a few seconds to boot.
01

Who and where am I?

Every session starts with three questions: who am I logged in as, where am I in the system, and what’s around me. Type each line into the terminal and press Enter.

whoami
pwd
ls
Expect whoami prints your username, pwd (“print working directory”) shows the folder you’re standing in, and ls (“list”) shows what’s inside it. If a folder is empty, ls simply prints nothing — that’s normal, not an error.
02

Moving around

The filesystem is a tree of folders (called directories). You move through it with cd — “change directory.” Let’s make a space of our own to work in, then step into it.

mkdir practice
cd practice
pwd
Expect mkdir (“make directory”) creates a folder called practice, cd steps into it, and pwd now ends in /practice — proof you moved. To go back up one level later, use cd .. (two dots means “the folder above this one”).
03

Reading and writing files

You don’t need an editor to create a file. The > symbol takes whatever a command prints and redirects it into a file instead of the screen. Then cat prints a file back out.

echo "hello from the barracks" > notes.txt
cat notes.txt
ls
Expect echo normally just repeats text back at you; here the > sends that text into notes.txt instead. cat reads it back, and ls now shows notes.txt sitting in your folder.
04

Hidden files — and your first flag

Files whose names begin with a dot are hidden — plain ls won’t show them. Attackers and defenders both care about this, because things get tucked away in dotfiles all the time. Let’s plant one, confirm it’s invisible, then reveal it. Capturing a hidden flag like this is the whole idea behind “capture the flag” security challenges.

echo 'flag{recruit_online}' > .hb_flag
ls
ls -a
cat .hb_flag
Expect plain ls won’t show .hb_flag — it’s hidden by the leading dot. Add -a (“all”) and it appears. cat .hb_flag reveals your flag: flag{recruit_online}. That -a is a flag in the other sense — a little option that changes how a command behaves.
05

Helping yourself

No one memorises every command. The real skill is knowing how to ask the system what a command does — and how to clear the clutter when the screen fills up.

ls --help
clear
Expect --help prints a quick summary of every option a command accepts — try it on any command you meet. clear wipes the screen clean so you can start fresh. You now have everything you need to explore on your own.

That’s the lab. You’re in.

In fifteen minutes you logged into a Linux system, moved through its folders, created and read files, uncovered a hidden flag, and learned how to ask the system for help. That’s the foundation everything else in security sits on.

Poke around on your own before you close the tab — try cd .., ls -a in different folders, or echo something new into a file. You can’t break anything; it resets when you leave.