Your first steps in Linux
Meet the terminal and the commands you will use in every lab.
Most servers and lab machines run Linux. In this room you learn to move between folders and read files from the terminal, the core skill behind every Wethaq room.
0 of 6 · 0 of 60 points
Linux terminal
Try this room's commands on real Linux running in your browser, with the files you need.
Task 1: Introduction
Linux is an open-source operating system that runs most internet servers, Android phones and network devices.
In cybersecurity you mostly work with Linux through the terminal: a window where you type text commands and see their output immediately. It is faster than a graphical interface, and most security tools only run there.
In later rooms you will start real machines and use these commands on them.
1.1I read the introduction and I am ready
Task 2: Moving around
At any moment the terminal is inside one folder, called the current directory.
| Command | What it does |
|---|---|
pwd | prints the current directory |
ls | lists what is in a folder |
cd <folder> | moves to another folder |
$ pwd
/home/ali
$ ls
Documents notes.txt
$ cd Documents
Files whose names start with a dot (like .bashrc) are hidden, and ls only shows them when you add the -a option.
Try it: start the "Linux terminal" at the top of the page and type
pwd, thenls -a. You will spot a hidden file.
2.1Which command prints the current directory?
102.2Which command lists a directory?
102.3Which option makes ls show hidden files too?
10Task 3: Reading files
The cat command prints a whole file:
$ cat notes.txt
Meeting at 10.
Remember the backup.
WQ{h3ll0_l1nux_…}
For long files use less to page through them (press q to quit), or head and tail to see the first or last lines.
In labs, a flag is a string like WQ{...} that you find in a file or a service, and you submit it here to prove you got there. In your terminal the flag ends with letters and numbers that are yours alone (for example WQ{h3ll0_l1nux_3f9a…}), so every learner's flag is different. Copy it from your terminal, not from this example.
Try it: in the terminal, type
cat notes.txtand copy the flag from the last line.
3.1Which command prints a whole file to the screen?
103.2Read the file from the example and submit the flag inside it
20