LAB-FS-01 - The Linux File System Tree
Navigate the standard Linux directory tree well enough to predict where configs, logs, programs, and user files usually live.
The Linux File System Tree
Navigate the standard Linux directory tree well enough to predict where configs, logs, programs, and user files usually live.
- Identify the likely purpose of /etc, /var, /home, /usr, and /tmp.
- Navigate to those directories without guessing.
- This lab is read-first. Do not edit system files while learning the layout.
Part A: The Field Guide
Linux does not separate drives with letters the way Windows often does. Instead, everything is attached under one directory tree that begins at /.
What matters for learning is not memorizing every folder. It is recognizing the main zones:
/etcfor system configuration/varfor changing data such as logs/homefor regular user files/usrfor most installed programs and shared resources/tmpfor temporary files
Useful Mental Model
Treat / as the top of the map, not as your home folder. Treat /root as the administrator’s home directory, which is a different thing.
Core directories to recognize
/etc: system-wide settings/var: data that changes while the system runs/home: user home directories/usr/bin: many installed commands/tmp: temporary working space/root: the root user’s own home directory
Part B: The Drill Deck
Terminal required: this lab is about observation and navigation, not editing.
G Guided Step by step - type exactly this and compare the result >
Exercise G1: Start at the top
- Go to the top of the file system:
cd / - List the main directories:
ls - Pick out
/etc,/var,/home,/usr, and/tmp
Exercise G2: Visit the most important locations
- Run
cd /etc && pwd - Run
cd /var && pwd - Run
cd /home && pwd - Run
cd /usr/bin && pwd - After each step, say out loud what that directory is generally for
Exercise G3: Inspect safely
- In
/etc, runls | head - In
/var, runls | head - In
/home, runls -la - Notice how the kind of content changes from place to place
S Solo Task described, hints available - figure it out >
Exercise S1: Predict before you check
For each task below, name the directory you expect before you navigate there:
- a system configuration file
- a user document
- a log file
- an installed command
Then verify your guess by navigating to the most likely directory.
Exercise S2: Root versus root
- Run
cd / && pwd - Run
cd ~ && pwd - If you have access, run
cd /rootonly if you understand that it is not the same as/
The point is to separate the top of the file system from a specific user’s home.
M Mission Real scenario - no hints, combine multiple skills >
Mission M1: Directory first, command second
For each scenario, choose the first directory you would inspect:
- You need to find a web server config file.
- You want to inspect a system log after an error.
- You want to find your own shell startup file.
- You want to check where many installed commands live.
If your first guess is usually correct, the file-system tree is starting to make sense.