
Linux is the most flexible and customizable operating system on the planet. That customizability starts deep within the heart of the Linux kernel and the file system.
A computer file system is a method of organizing, managing, and storing data on a local drive and provides a structure for files to be stored, retrieved, and manipulated.
The Linux file system is composed of three layers:
- The logical file system is the interface between user applications and the file system.
- The virtual file system provides a standard interface for compatibility.
- The physical file system is responsible for the management of physical memory blocks.
Not familiar with Linux? The reason why the concept of the file system might seem foreign is that neither MacOS nor Windows offers options with regard to choosing which file system you want to use.
Also: The 5 most customizable Linux desktop environments - when you want it your way
Linux, on the other hand, has several options for file systems, each with its pros and cons. Knowing this information might not only help you choose a Linux distribution that's perfect for you, but also choose a file system that is up to whatever tasks you have for the operating system.
Let's examine the three most popular Linux file systems (and the pros and cons of each) to determine whether an alternative is best for your needs.
ext4
The ext4 file system is the default for most Linux distributions. The reason for that is simple: It's trusted. Ext4 has been around for 16+ years and has proven itself to be one of the most stable file systems available. Most distributions that opt for ext4 don't even offer alternatives within the standard installation. For example, with Ubuntu, you have to go the manual partitioning route to select an alternative file system.
The pros:
- High performance and scalability.
- Supports large file systems (up to 16 exabytes).
- Efficient use of disk space with features like " journaling" and "directory indexing."
- Compatible with most modern desktop environments.
The cons:
- May require additional configuration for optimal performance in some cases.
- Can be slower on older hardware because of high overhead from the ext4 file system's journaling mechanism.
If you have an older PC to be used for Linux, ext4 might not be the best option. That said, for any system that supports Windows 8 or higher, ext4 is probably your best bet for typical desktop usage.
Also: The best Linux distributions for beginners: Expert tested and reviewed
Distributions that default to ext4 include Ubuntu, Linux Mint, elementaryOS, ZorinOS, Fedora, Pop!_OS, and Debian.
XFS
The XFS file system was created for large file reads and writes. This is beneficial for businesses that depend on the storage and retrieval of large media files, as XFS can perform the read and write operations simultaneously. The parallel I/O operations greatly improve performance.
This means, however, that XFS probably isn't the best option for a desktop computer (unless that computer will be serving large files to a LAN, as in the case of a media server).
Pros:
- A high-performance, write-intensive file system is ideal for databases and file servers for larger files (such as media).
- Supports large file systems (up to 16 exabytes) and includes features like journaling and stripe block allocation.
- Resilient against disk failures due to its ability to maintain a journal of metadata changes.
Cons:
- XFS is far more complex than ext4, making it too challenging for those new to Linux.
- Not well supported by older systems or non-standard hardware.
Few Linux distributions default to XFS, one of which is Oracle Linux.
Btrfs (B-Tree Filesystem - also known as butterfs)
Btrfs is a modern copy-on-write Linux file system that includes advanced features for fault tolerance, repair, and administration. Btrfs uses a copy-on-write file system, which means if a file is modified/written to the storage, the file is not replaced but, instead, a copy of the file is created.
Also: I finally found a visually pleasing Linux distro that doesn't skimp on performance
Btrfs has become a popular option for Linux because of its built-in snapshotting tools, which means if something goes wrong with your system, you can easily roll back to a previous (working) snapshot.
Pros:
- Supports snapshots and clones with minimal data duplication.
- Can work with multiple file system types on a single device.
- Includes features like RAID support for disk redundancy and mirroring.
Cons:
- Resource-intensive compared to other filesystems, which can lead to slower performance in certain cases.
- It is less suitable for simple use cases due to its feature-rich design.
Distributions that use Btrfs as the default include Fedora, SUSE Linux Enterprise Server, and openSUSE.
How to choose
In the end, my recommendation would be to stick with the distribution's default file system because it's easier, and the developers have chosen that particular file system for a reason.
However, if you have a particular need that an alternative file system outlined above would meet, consider using that instead.
Get the biggest stories in tech every Friday with ZDNET's Week in Review newsletter.