Before you can secure a Linux system, you need to understand how it is organized. The Linux filesystem has a specific structure that differs fundamentally from Windows. Every file, device, and process is represented in a single hierarchical tree starting at the root directory. Understanding this structure is essential for finding configuration files, investigating incidents, and navigating efficiently from the command line.
Unlike Windows with its drive letters (C:, D:, etc.), Linux uses a single root directory (/) with everything branching from it. Here are the directories every security professional must know:
| Directory | Purpose | Security Relevance |
|---|---|---|
| / | Root of the filesystem | Top of the hierarchy |
| /bin | Essential user binaries (ls, cp, cat) | Tampering = system compromise |
| /sbin | System binaries (fdisk, iptables) | Admin tools, often targeted |
| /etc | Configuration files | Critical — contains all system configs |
| /home | User home directories | User data, SSH keys, bash history |
| /root | Root user's home | Often overlooked in audits |
| /var | Variable data (logs, caches) | Log files, mail spools, web content |
| /var/log | System log files | Incident response goldmine |
| /tmp | Temporary files | Common malware staging area |
| /dev | Device files | Hardware access, potential attack vector |
| /proc | Process information (virtual) | Running process details, system info |
| /usr | User programs and libraries | Applications, shared libraries |
| /opt | Optional software | Third-party applications |
| /boot | Boot loader files | Tampering = bootkit potential |
Security professionals spend most of their time in the terminal. These commands are your bread and butter:
Reading, searching, and analyzing files is a daily task for security professionals. These commands are indispensable:
💡 The find command is one of the most powerful tools in a security professional's toolkit. Use it to locate recently modified files, SUID binaries, world-writable files, and files owned by specific users during incident response.
The /etc directory is the single most important directory for security professionals. It contains virtually every system configuration file. During audits and incident response, you will spend significant time here.
⚠️ Never edit /etc/sudoers directly with a text editor. Always use 'visudo' which validates syntax before saving. A syntax error in sudoers can lock you out of all administrative access.
Verify exercises to earn ★ 120 XP and unlock next lab level.