Navigating the Filesystem & the FHS
Module 1 · Setup & Study Plan

Navigating the Filesystem & the FHS

The Filesystem Hierarchy Standard, absolute vs. relative paths, and the man/apropos toolkit for finding help without leaving the terminal.

The Filesystem Hierarchy Standard (FHS)

Every mainstream Linux distribution lays out its directories the same way, because they all follow the Filesystem Hierarchy Standard. Memorize this table — Linux+ loves asking “which directory stores X.”

DirectoryStores
/The root of the entire filesystem — everything else hangs off this one directory
/bin, /sbinEssential command-line binaries needed even in single-user/recovery mode (/sbin = superuser-oriented tools)
/bootFiles required to boot: the kernel, initramfs, and GRUB configuration
/devDevice files representing hardware attached to the system (/dev/sda, /dev/tty1)
/etcSystem-wide configuration files (host-specific, not binaries)
/homeRegular users’ home directories and personal files
/lib, /lib64Shared libraries required by the binaries in /bin and /sbin
/mediaMount points for removable media (USB drives, optical discs)
/mntConventional mount point for temporarily mounting a filesystem by hand
/optOptional, self-contained third-party software packages
/procA virtual filesystem exposing live kernel and process information as files
/rootThe root user’s home directory (not the same as /)
/srvData served by this system (web content, FTP files)
/sysA virtual filesystem exposing kernel information about devices
/tmpTemporary files — may be cleared on reboot
/usrShareable, mostly read-only user-space programs and data — the biggest branch of the tree
/varVariable data that changes as the system runs: logs, mail spools, print spools

Inside /usr you’ll find a smaller version of the root layout: /usr/bin (executables for all users), /usr/local (locally-built software, kept separate from package-manager files), /usr/lib / /usr/lib64 (libraries for 32-bit vs. 64-bit binaries), and /usr/share (read-only, architecture-independent data like man pages and icons).

⚠️ Common Pitfall: /root vs. /

/root is the home directory of the root user — nothing more. It is not a synonym for the filesystem root /. Confusing the two is a classic first-week mistake, and Linux+ will test it directly.


Absolute vs. Relative Paths

An absolute path always starts at / and works from anywhere: /home/clark/notes.txt. A relative path is interpreted from your current location: notes.txt or ../shared/notes.txt.

CommandEffect
pwdPrint your current working directory
cd /var/logChange to an absolute path
cd ..Move up one level from the current directory
cd -Jump back to the previous working directory
cd or cd ~Return to your home directory
cd /Return to the root of the filesystem

You traverse the tree by combining cd with either path style — relative paths are shorter for nearby moves, absolute paths are unambiguous no matter where you start.


Listing, Searching & Getting Help

TaskCommand
List directory contents, long format, including hidden filesls -la
List a directory itself, not its contentsls -ld directory/
Colorized output for quick scanningls --color (often the default already)
Search for files by name, type, or locationfind /path -name "*.conf"
Search for files indexed system-wide (fast, but only as fresh as the last index)locate filename
Find the absolute path of a command, searching from /which command or whereis command
Get the full manual page for a commandman command
Search inside all man page descriptions for a keywordman -k keyword (equivalent to apropos keyword)
One-line description of what a command doeswhatis command
Reference docs for libraries and installed packages/usr/share/doc/
⚠️ Common Pitfall: Principle of Least Privilege Starts With Visibility

Being able to ls -ld a directory without listing its contents matters for more than convenience — it’s how you audit who can see what. The principle of least privilege says every account should have the minimum access needed to do its job, and that starts with knowing exactly what a given permission set exposes. You’ll see this idea again constantly in the Security module.


🧠 Knowledge Check

1. Which directory holds files required to boot the system, including the kernel and GRUB configuration?

2. You want to list a directory's own permissions and metadata without printing everything inside it. Which command does that?

3. What's the difference between /root and / (root)?


What’s Next

You can now find your way around a live system and its documentation. Module 2 puts that to work: creating, editing, and locking down files and directories.