Section 2 · The filesystem

One big tree, rooted at /

Linux has no "C: drive". Everything — every file, every disk, every device — hangs off a single tree that starts at the root directory, written /. Learn the map and you'll always know where you are and where things live.

1The tree

Run ls / to see the top-level directories, then tree /etc to explore one branch:

student@rhel9: ~ — bash
try: ls /etc · ls /var/log · tree /etc

2Where things live (the important dirs)

DirectoryHolds
/the root — the top of the whole tree
/homenormal users' personal folders (/home/student)
/rootthe root user's home (not the same as /!)
/etcsystem configuration files (passwd, hostname, services)
/vardata that changes: /var/log (logs), /var/www (websites)
/usrinstalled programs & their files (/usr/bin)
/bin, /sbinessential command binaries
/tmptemporary scratch space (wiped on reboot)
Remember three and you're set /etc = configuration, /var/log = logs, /home = your stuff. Those three cover most day-to-day admin work.

3Moving around: cd

cd = change directory. Watch the prompt change as you move:

student@rhel9: ~ — bash
try: cd /etc · cd .. · cd projects · cd (alone → home)

4Absolute vs relative paths

PathMeaning
/etc/hostsAbsolute — starts at /, works from anywhere
projects/app.pyRelative — from wherever you are now
.the current directory
..the parent directory (one level up)
~your home directory (/home/student)
-the previous directory you were in
Navigation drill From home, run: cd projectscd ..cd /var/logcd - (jumps back) → cd (home). Keep an eye on the prompt after each.

🧠Checkpoint

🧠

Quick check

1. System configuration files live in…
/etc holds config: passwd, hostname, service settings.
2. .. refers to…
.. = up one level; . = here; ~ = home.
3. Which is an absolute path?
Absolute paths start at / and work from anywhere.
🔓 You're reading a free chapter of Linux Admin — the first two are open.
Unlock the rest of this course with a one-time payment.
Unlock this course →
🔓 See course prices