Skip to content
Français
Sync not enabled: your progress stays in this browser My learning
Select theme
Français

Choose a file system on Linux

By updated

Improve this page

For most servers, the right choice is simple: ext4 on Debian/Ubuntu, XFS on RHEL; Btrfs when you want snapshots. This guide is a decision-oriented comparison between ext4, XFS and Btrfs (with ZFS and specialised systems placed), to choose according to real use and not out of habit. For beginner to intermediate administrators. It also points out the 2026 traps: XFS does not shrink in production, Btrfs RAID 5/6 remains discouraged in production.

What you will learn

  • Choose between ext4, XFS and Btrfs for your case
  • The default file system of each distribution
  • The real strengths and limits of each
  • The traps to avoid (XFS shrink, Btrfs RAID 5/6)

Quick recommendation

Before the details, the decision by use case. When in doubt, follow your distribution's default: it is the system best tested on that platform.

Your needRecommended choice
File server, large volumes, parallel I/OXFS
DatabaseXFS (or ext4)
Debian / Ubuntu root systemext4 (default)
RHEL / AlmaLinux / Rocky root systemXFS (default)
Workstation with snapshots / rollbackBtrfs
Having to shrink a partition laterext4 (XFS does not shrink)
USB key / multi-OS exchange diskexFAT (or FAT32)
EFI system partition (ESP)FAT32 (mandatory)
Software RAID with parity (5/6)mdadm + ext4/XFS (not Btrfs RAID 5/6)

The default file system of your distribution

Each family of distributions has made a default choice, and it is rarely by chance:

  • Debian 13 and Ubuntu 24.04 install on ext4: the most proven, resizable both ways.
  • RHEL 10, AlmaLinux and Rocky install on XFS: built for server workloads and large volumes.
  • Fedora (since version 33) uses Btrfs on the desktop, for its snapshots; its server editions stay on XFS.
  • openSUSE and SLES use Btrfs for the root (with snapper snapshots and rollback) and XFS for data.

Following the default means benefiting from the best integrated and most tested system on your platform, and the one most expected in an LFCS or RHCSA exam.

ext4: the safe bet

ext4 (fourth extended filesystem) is Linux's most mature journaled file system. Its strength is its robustness and an asset XFS lacks: it resizes both ways with resize2fs (grow online, shrink unmounted).

  • For: maturity, stability, small footprint, shrinking possible.
  • Against: no native snapshots or compression, no data checksums (only metadata is protected by the journal). Size limits are wide but finite: files up to 16 TiB, file system up to 1 EiB.
  • When: Debian/Ubuntu root system, general-purpose servers, VMs, any case where you want simplicity and the possibility to shrink a volume.

XFS: server performance

XFS is the default of the Red Hat family. Its architecture in allocation groups handles several writes in parallel, which excels on large files and concurrent access.

  • For: high performance, scalability, online growth (xfs_growfs), project quotas (limit per directory tree).
  • Against: no shrinking in production. An XFS volume is managed by growing only; to shrink it cleanly, you must back up, recreate smaller, restore. No native snapshots (relies on LVM).
  • When: file servers, databases, large volumes, RHEL/AlmaLinux/Rocky root system.

Btrfs: snapshots and modern features

Btrfs (B-tree filesystem) brings features missing from ext4 and XFS, built on copy-on-write (CoW).

  • For: atomic snapshots and subvolumes, transparent compression (zstd, lzo), data checksums (corruption detection), send/receive for incremental backups, built-in RAID 0/1/10, online shrinking (btrfs filesystem resize -300M /, measured on btrfs-progs 6.14).
  • Against: more complex; performance varies with the workload (very busy databases).
  • When: workstations (Fedora/openSUSE default), system snapshots with snapper or Timeshift, storage that wants compression and integrity.

ZFS and specialised systems

ZFS (through the OpenZFS project) offers end-to-end integrity, snapshots and disk pools (RAID-Z). But it is not in the Linux kernel: its CDDL licence is considered incompatible with the GPL, so it is installed as an external module (separate package, which Ubuntu even offers for the root). Powerful, but outside the scope of a standard system.

Special-purpose systems, in one line each:

  • FAT32 / exFAT: multi-OS exchange (USB keys, SD cards); FAT32 is mandatory for the EFI partition (ESP), the UEFI firmware only reads that.
  • F2FS: optimised for dedicated flash storage (mobile, embedded).
  • tmpfs: file system in RAM, volatile, for /tmp and /run.
  • OverlayFS: a stacking file system, the foundation of container images.

How to decide

Three questions are enough most of the time:

  1. Will I have to shrink this volume? If so, rule out XFS: ext4 shrinks unmounted with resize2fs, Btrfs even online.
  2. Do I need built-in snapshots or compression? If so, Btrfs.
  3. Otherwise: follow the distribution's default (ext4 on Debian/Ubuntu, XFS on RHEL). It is the safest and best supported choice.

For parity RAID or encryption, these features are handled below the file system, by mdadm and LUKS, independently of the choice above.

Key points

  • When in doubt, follow the default: ext4 (Debian/Ubuntu), XFS (RHEL/AlmaLinux/Rocky).
  • ext4 shrinks unmounted (resize2fs), Btrfs online; pick one of the two if you plan to shrink.
  • XFS excels on large volumes and parallel I/O, but does not shrink in production (experimental shrinking limited to the last allocation group).
  • Btrfs brings snapshots, compression and checksums; its RAID 5/6 remains discouraged (write hole).
  • ZFS is outside the kernel (CDDL licence); FAT32 is mandatory for the EFI partition.
  • bcachefs, ReiserFS and JFS are not deployment choices in 2026.

Knowledge check

Check that the essentials of this guide are acquired. The questions only cover what has just been explained here.

Knowledge check

Check what you have learned with this interactive quiz

6 questions
6 min
70% to pass

How it works

  • The timer starts when you click Start
  • Multiple choice, true/false and short answer questions
  • You can move between questions
  • Detailed results are shown at the end

Starts the quiz and the timer