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

If a disk is just magnetic platters or flash cells, how do files exist? The file system is the organizing logic. It decides how to: store file data in blocks, record metadata (name, size, timestamps, permissions) in inodes, keep track of which blocks are used or free, handle writes safely so crashes don't corrupt data.

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

FilesystemTypeWhat it does
tmpfsRAM-basedStores files in memory — fast, lost on reboot. Used for /tmp, /run.
procVirtualKernel process info at /proc — not on disk at all.
sysfsVirtualHardware info at /sys.
devtmpfsVirtualDevice files at /dev.
vfat/FAT32PhysicalUSB drives, EFI partition — compatible with Windows.

Mounting — How Linux Attaches Filesystems

Why doesn't Linux have drive letters like C:\ or D:\? Linux has a single filesystem tree starting at /. 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.
# Mount a disk partition at /data sudo mount /dev/sdb1 /data # Unmount sudo umount /data # Show all mounted filesystems mount | column -t df -hT # with disk usage # Persistent mounts — /etc/fstab # UUID=abc123 /data ext4 defaults 0 2 # Use UUID not /dev/sdb1 (device names can change!) blkid /dev/sdb1 # find UUID

Frequently Asked Questions

What will I learn here?

This page covers the core concepts and techniques you need to understand the topic and progress confidently to the next lesson.

How should I use this page?

Start with the overview, then follow the section links to deepen your understanding. Use the table of contents on the right to jump to specific sections.

What should I read next?

Use the navigation below to continue to the next lesson or explore related topics.