What You'll Learn
Every Linux system organizes files and folders in a single tree starting at / (called "root"). Unlike Windows with C:\, D:\ drives, Linux uses one unified hierarchy. This guide explains the most important directories so you know where everything lives.
The Root Directory Structure
Type ls / to see all top-level folders. Here's what each one does:
| Directory | Purpose |
|---|---|
/bin | Essential command binaries (ls, cp, grep) — available to all users. |
/etc | Configuration files for the system and applications. |
/home | User home directories. Your files live in /home/yourusername. |
/var | Variable data — logs (/var/log), mail, caches. |
/tmp | Temporary files. Cleared on reboot. |
/usr | User programs and libraries — the largest directory on most systems. |
/opt | Optional/add-on software packages (e.g., Google Chrome, Slack). |
/root | The root user's home directory. You need sudo to access it. |
/dev | Device files — hardware is represented as files here. |
/proc | Virtual filesystem showing process and kernel information in real time. |
/sys | Another virtual filesystem for kernel and device parameters. |
Troubleshooting
- "bash: cd: no such file or directory" — Double-check the path. Use
pwdto confirm where you are. - "Permission denied" — You may need
sudoto access system directories like/rootor/etc.
What's Next?
Now that you understand the file system layout, learn the essential commands every beginner needs:
Your First Linux Commands →