Lesson 1 of 8

Terminal Basics & Navigation

The Linux command line is the primary interface for every major security tool, and fluency with the terminal is non-negotiable for any aspiring hacker. You will learn to navigate the filesystem, manipulate files and directories, and use essential commands that form the foundation of all Linux work. By the end of this lesson, the terminal will feel like a natural extension of your hands.

Learning Objectives — Deep Dive

Each objective below is broken down into plain English so you know exactly what you are learning, why it matters, and what you will be able to do when you are done. Mark each one complete as you work through the lesson.

0/4
In plain English

In simple terms: Navigate the Linux file system using the terminal. This means building enough understanding that you can apply this concept in a real scenario — not just answer a quiz question about it, but actually use it when it matters. Focus on the "why" behind the concept, not just the "what."

Why this matters

Almost every professional security tool runs on Linux, and almost every server you will ever test runs Linux. Fluency in the terminal is not optional — it is the foundation that every other skill in this field is built on.

Real-world analogy

Think of it like learning to drive. You do not need to understand how the engine works to drive safely, but knowing the basics helps you diagnose problems and avoid mistakes that could cause accidents. The same principle applies here — foundational knowledge prevents costly errors.

What you will be able to do

Navigate a Linux system confidently from the command line, write basic automation scripts to speed up repetitive tasks, and use the terminal-based security tools that are standard in professional penetration testing.

Beginner tip

Do not try to memorize everything at once. Read through the material once to get the big picture, then go back and work through the lab. The hands-on practice is what makes the concepts stick — passive reading alone will not get you there.

Terminal Basics & Navigation · Objective 1 of 4

VIDEO
Loading video…
1

Open a terminal

In Kali Linux, right-click the desktop and select 'Open Terminal Here', or click the terminal icon in the taskbar. You will see a prompt in the format 'kali@kali:~$' — the tilde (~) represents your home directory (/home/kali). If you are working on a remote server via SSH, the terminal is your only interface, so becoming comfortable with it now is essential. Try pressing Ctrl+Alt+T as a keyboard shortcut to open a new terminal window quickly.

2

Navigate the file system

Run 'pwd' to confirm your starting location, then practice navigating to the key directories every hacker needs to know: 'cd /etc' (system configuration files), 'cd /var/log' (log files that record system activity), 'cd /home' (user home directories), and 'cd /tmp' (world-writable temporary storage often used in exploits). After each 'cd' command, run 'ls -la' to see all files including hidden ones (those starting with a dot). Use 'cd ~' to return to your home directory and 'cd -' to jump back to the previous directory.

cd /etc && ls -la
3

Read important files

Run 'cat /etc/passwd' to view all user accounts on the system — each line contains the username, UID, GID, home directory, and default shell. The /etc/shadow file stores password hashes and requires root to read; run 'sudo cat /etc/shadow' to view it. In a real privilege escalation scenario, reading /etc/shadow gives you hashes to crack offline. Notice that service accounts like www-data and nobody have /usr/sbin/nologin as their shell, which prevents interactive login.

cat /etc/passwd && sudo cat /etc/shadow
4

Search for files

Run 'find / -perm -4000 -type f 2>/dev/null' to find all SUID (Set User ID) binaries on the system. SUID binaries run with the permissions of their owner rather than the user who executes them — if a SUID binary is owned by root, it runs as root regardless of who launches it. The '2>/dev/null' redirects error messages (permission denied) to /dev/null so they do not clutter your output. Any unusual SUID binary that is not part of the standard Linux installation is a potential privilege escalation vector.

find / -perm -4000 -type f 2>/dev/null
5

Use pipes

Run 'cat /etc/passwd | grep -v nologin | cut -d: -f1' to extract only the usernames of accounts that have a real login shell. The pipe (|) sends the output of one command as input to the next — this is one of the most powerful concepts in Linux. The 'grep -v nologin' filters out service accounts, and 'cut -d: -f1' extracts only the first field (username) using colon as the delimiter. Practice building longer pipelines: 'ps aux | grep apache | grep -v grep | awk "{print $2}"' extracts the PID of the apache process.

cat /etc/passwd | grep -v nologin | cut -d: -f1