Linux File System Types
A file system is the layer that turns raw disk storage into the folders and files you interact with. Linux supports many file systems, each with different trade-offs around performance, reliability, and features.
What a File System Actually Does
Think of a disk without a file system like a library with no catalog and no shelves — just books scattered on the floor. The file system is the catalog and shelving system.
ext4 — The Reliable Workhorse
ext4 (4th extended filesystem) is the default on most Linux distributions and has been for over a decade. It's battle-tested, well-understood, and works reliably everywhere.
- Journaling: Logs changes before making them, so crashes don't corrupt the filesystem.
- Extents: Stores large files as contiguous ranges, not scattered block lists.
- Max file size: 16 TB. Max filesystem size: 1 EB.
- Best for: Most workloads — servers, desktops, general use.
btrfs — Modern Features
btrfs (B-tree filesystem) is designed around modern storage needs. It's the default on Fedora and is used by Facebook for data centers.
- Copy-on-Write (CoW): Writes never overwrite existing data — new data is written to a new location. Old data stays until references are updated. This enables snapshots.
- Snapshots: Instant, space-efficient filesystem snapshots. Roll back your system in seconds.
- Checksums: Data integrity verification built-in — detects silent corruption.
- Subvolumes: Multiple filesystems within one partition (like LVM, but simpler).
- Best for: Desktops wanting snapshots, Fedora users, NAS/storage servers.
xfs — High Performance
xfs excels at large files and high-throughput workloads. It's the default on RHEL/CentOS and common in HPC and video production.
- Parallel I/O: Multiple threads can write simultaneously without bottlenecks.
- Huge files: Handles extremely large files efficiently.
- Limitation: Cannot shrink a mounted xfs filesystem.
- Best for: Databases, video editing, large file storage, enterprise.
Special File Systems
| Filesystem | Type | What it does |
|---|---|---|
| tmpfs | RAM-based | Stores files in memory — fast, lost on reboot. Used for /tmp, /run. |
| proc | Virtual | Kernel process info at /proc — not on disk at all. |
| sysfs | Virtual | Hardware info at /sys. |
| devtmpfs | Virtual | Device files at /dev. |
| vfat/FAT32 | Physical | USB drives, EFI partition — compatible with Windows. |
Mounting — How Linux Attaches Filesystems
/. Any filesystem (disk partition, USB drive, network share) gets mounted at a directory in this tree. That directory becomes the root of the mounted filesystem.