Live lesson · progress saved to your account

Linux Basics — Part 1

Make friends with the terminal: your first commands and how to move around files and folders.

beginner25 minwalkthrough

Anyone can read this lesson. To submit answers and earn XP, create a free account.

TASK 01Why Linux?

Most of the world's servers, Android phones, routers and security tools run on Linux, so every hacker needs to be comfortable with it.

Different flavours of Linux are called distributions (or distros) — for example Ubuntu, Debian, and the security favourite Kali Linux.

Answer the questions

+10 XP

+10 XP

TASK 02Your first commands

Type a command in the terminal and press Enter:

operative@anyonehack:~$ echo "Hello, world"
Hello, world
operative@anyonehack:~$ whoami
operative
CommandWhat it does
echoPrints back whatever text you give it
whoamiShows which user you are logged in as

Answer the questions

+10 XP

+10 XP

TASK 03Moving around files and folders
CommandShort forWhat it does
lslistShow files in the current folder
cdchange directoryMove into another folder
catconcatenatePrint a file's contents
pwdprint working directoryShow the full path of where you are
operative@anyonehack:~$ ls
Notes  Projects  secret.txt
operative@anyonehack:~$ cat secret.txt
AOH{first_flag_captured}
operative@anyonehack:~$ cd Projects
operative@anyonehack:~/Projects$ pwd
/home/operative/Projects

In CTF challenges, flags are hidden in files just like this, in the format AOH{...}.

Answer the questions

+10 XP

+20 XP

+10 XP