Chapter 4
Linux File System
Linux organizes everything as files and directories in a single tree starting from the root (/). This chapter introduces the standard layout.
Root and the hierarchy
Everything starts at root, written as /. There are no drive letters like in Windows; all disks and partitions are mounted somewhere under /.
Important directories
| Path | Purpose |
|---|---|
/home | User home directories |
/etc | System configuration files |
/bin, /usr/bin | Executable programs |
/var | Variable data (logs, caches) |
/tmp | Temporary files |
/root | Root user's home |
Paths
- Absolute path: Starts with
/, e.g./home/user/Documents. - Relative path: Relative to your current directory, e.g.
Documentsor../other.
Use pwd to see your current directory and ls to list its contents. These are covered in the Basic Commands chapter.