Module 1 · Linux Essentials for Security · Lesson 2 of 10

Finding your way around

The shell, the file system layout, and the safe inspection commands you'll use before changing anything.

In this lesson · about 18 minutes

  • Move around the file system and list files with details
  • Know where Linux keeps configuration, logs and home folders
  • Inspect a system without changing it

Whiteboard · watch and try

Whiteboard: reading a path like an address

Press Play to see how a path works, and the three commands that only look.

5 steps
Press Play and the tutor will talk you through it while writing on the board. Pause any time to write on the board yourself.

Tip: press Pause, then use the pen to work along on the board. Space plays and pauses; Ctrl+Z undoes your last mark.

Try it · watch it happen

Linux folders as rooms in a house

Click any room to walk there and see what's inside. Then try the game: which room would you search?

The front door

/

The very top of everything. Every file on the computer lives somewhere under here.

Why security cares: Every full path starts with /, like an address starts with the country.

terminal
learner@ubuntu-lab:~$ ▋

Most servers, cloud workloads, firewalls and security tools run Linux. Defenders use it to read logs and harden systems; testers use it as their workbench. Everything starts in the shell, a program that reads the commands you type.

Where things live

FolderWhat's thereWhy security cares
/etcSystem-wide configuration, like /etc/ssh/sshd_config and /etc/passwdMost hardening changes happen here
/var/logMany logs, like auth.log (logins and sudo) and syslogYour evidence
/homeEach user's home folder, like /home/learnerUser files, SSH keys in ~/.ssh
/rootThe root user's homeShould be readable only by root
/tmpTemporary files anyone can writeA favourite place for attackers to drop tools

Safe inspection commands

pwd (where am I?), ls -la (list everything, including hidden files, with details), cd (change folder), less FILE (read a file page by page; press q to quit). Commands like cp, mv and mkdir change things, and rm deletes without a recycle bin. During the first look at any system, stick to commands that only read.

Hands-on lab (simulated terminal)

Lab: first look at a server

You've just logged in to a disposable Ubuntu lab VM as learner. Look around without changing anything.

Step 1 of 4. Type each command and press Enter. Nothing runs on your computer.

Lab: first look at a server

1. Print your current directory.

learner@ubuntu-lab:~$

Sorting drill

Read-only or changes something?

During a first inspection, which commands are safe?

  • ls -la /etc
  • less /var/log/auth.log
  • id
  • mv sshd_config sshd_config.old
  • rm -rf ~/lab
  • chmod 777 /var/www

0 of 6 sorted

Check your understanding0 of 3 correct

Question 1

1.Where would you look first for records of logins and sudo use on Ubuntu?

Question 2

2.Which command lists hidden files?

Question 3

3.Where is most system configuration kept?

Quiz score: 0 of 3

Tip: answer every quiz question correctly first.

Noviq Academy is free and for learning. Every terminal here is simulated and every log is synthetic. Practise on a disposable VM with a snapshot, never on a production server. Ubuntu is a trademark of Canonical Ltd.; this course is independent of Canonical.