# Navigating the Filesystem ## Everything is one tree, starting at `/` Linux has exactly one filesystem tree, rooted at `/` (pronounced "root," unrelated to your username). Every file and directory, no matter what physical disk it's actually on, appears somewhere under this one tree — there's no separate "C:\" and "D:\" the way Windows shows multiple drives. ## Absolute vs. relative paths An **absolute path** starts with `/` and always means the same location no matter where you currently are: `/home/student/notes.txt`. A **relative path** is interpreted relative to your CURRENT directory: `notes.txt` means something different depending on where you're standing when you type it. `.` means "this directory," `..` means "one directory up" — `cd ..` moves up one level, `cd ../..` moves up two. ## Key commands - `pwd` — print your current directory (where am I?) - `ls` — list what's in a directory (`ls -la` shows hidden files and details) - `cd ` — change directory (absolute or relative) ## Hidden files A file or directory starting with `.` (like `.bashrc` or `.config`) is "hidden" — `ls` skips it by default, `ls -a` shows it. This isn't a security feature, just a convention to keep configuration/metadata files out of the way of normal directory listings. ## The important top-level directories (conceptually, not memorized) You don't need to memorize the entire Filesystem Hierarchy Standard, but recognizing these by purpose will save you real confusion later: - **`/etc`** — system-wide configuration files (nginx's config lives at `/etc/nginx/nginx.conf`) - **`/var`** — variable data that changes while the system runs: logs (`/var/log`), among others - **`/home`** — personal directories for regular users - **`/tmp`** — temporary files, safe to assume anything here can disappear on reboot - **`/usr`** — most installed programs and their supporting files live somewhere under here - **`/proc`** — not real files on disk at all — a live, kernel-generated view into running processes and system state (you'll use this again in Module 5) ## Instructor Notes **Lesson goal:** Give students a working mental model of "one tree, absolute vs. relative paths" plus just enough top-level-directory recognition to not be lost later — not FHS memorization. **Approximate timing:** 15 minutes read; 10 minutes live. **Common misconception to watch for:** students coming from Windows sometimes expect separate drives/roots — emphasize the single unified tree explicitly. **Demo idea:** `cd /` then `ls`, narrating what each top-level directory is for as you see it, rather than listing them in the abstract.