Linux Basic — The Linux File System
The Linux File System
Everything in Linux is a file. Configuration, devices, processes, and network sockets are all represented as files in a single unified directory tree. Understanding this tree — and how files work — is fundamental to Linux mastery.
What You Will Learn
By the end of this chapter you will be able to:
- Navigate the Filesystem Hierarchy Standard (FHS) directory structure
- Explain the difference between absolute and relative paths
- Read and interpret
ls -lfile type characters - Explain what an inode is and use
statto inspect one - Understand hard links and symbolic links
- Use
dfandduto monitor disk space
Topics in This Chapter
| # | Topic | Description |
|---|---|---|
| 1 | FHS Directory Hierarchy | What each directory is for |
| 2 | Absolute vs Relative Paths | How Linux paths work |
| 3 | File Types and Inodes | What ls -l type characters mean |
| 4 | Hard Links and Symlinks | Two kinds of file links |
| 5 | Disk Usage: df and du | Monitor and analyse disk space |
| 6 | Practice Exercises | Hands-on tasks |
The Single-Root Tree
Unlike Windows (C:\, D:), Linux has a single root /:
/ ← root of everything
├── bin/ ← user commands
├── etc/ ← configuration files
├── home/ ← user home directories
│ ├── ubuntu/
│ └── alice/
├── var/ ← variable data (logs, databases, mail)
│ └── log/
└── tmp/ ← temporary files
Every file on every disk appears somewhere in this tree. External drives, network shares, and USB sticks are all mounted as subdirectories.
Next → FHS Directory Hierarchy