Lab Complete!

You navigated Linux like a pro.

LABS / linux basics
BEGINNER
Tasks
The Linux filesystem

Linux stores everything — files, programs, devices — in one big tree starting at /, called root. Your personal files live under /home/yourname, often shown as ~.

Think of folders inside folders: Like Windows' File Explorer, but instead of clicking, you type the path: /home/alice/Documents.
Finding your way
pwd # print working directory — where am I? ls # list files here ls -la # list all, including hidden, with details cd folder # change directory into "folder" cd .. # go up one level cd ~ # jump to your home directory

Files starting with a dot, like .bashrc, are hidden. Plain ls skips them — you need -a to see them.

Working with files
cat file.txt # print a file's contents touch file.txt # create an empty file mkdir newfolder # create a folder cp a.txt b.txt # copy a file mv a.txt b.txt # move or rename a file rm file.txt # delete a file
Searching text
grep "word" file.txt # find lines containing "word" grep -r "word" . # search every file, recursively

grep is how you search inside files instead of just by filename — useful for finding a password, a flag, or an error buried in a big log.

Who and what
CommandShows
whoamiYour current username
ls -lFile permissions, owner, size, date
chmod +x fileMake a file executable
clearClear the terminal screen
Careful with rm: Linux usually will not ask "are you sure?" Deleted files do not go to a recycle bin.
Mission: You've logged into a server. Somewhere in your home directory is a flag — find it using only the terminal on the right.
1
Get your bearings
Check your current directory and list everything in it — including hidden files.
2
Explore a folder
Move into the projects folder and list what's inside.
3
Read a file
One file looks interesting. Print its contents to the screen.
4
Search for the flag
Use grep to search every file in your home directory for the word "flag", then submit what you find.
Try first, then peek. Hints nudge you without the exact answer.
Plain ls will not show everything. Add the flag for "all" — it starts with a dash.
cd followed by a folder name moves you inside it. cd .. always goes back up one level.
cat followed by a filename prints the whole file at once.
Use grep -r "flag" ~ to search recursively from your home directory, instead of checking each file by hand.
Stuck after trying? Reveal the walkthrough.
alice@lab-server: ~
alice@lab:~$
Live Command Breakdown
Start typing a command to see what each part does...
Waiting for input
Commands this simulator understands
CommandDoes
pwdShow current directory
ls / ls -laList files (add -a for hidden)
cd <dir>Change directory
cat <file>Print file contents
mkdir / touchCreate a folder / empty file
rm <file>Delete a file
grep [-r] "x" pathSearch for text
whoami / clearShow user / clear screen