In a computer, a file system (sometimes written filesystem) is the way in which files are named and where they are placed logically for storage and retrieval.

Different operating systems support different file systems. Your removable drive should use FAT32 for best compatibility, unless it’s bigger and needs NTFS. Mac-formatted drives use HFS+ and don’t work with Windows. And Linux has its own file systems, too.

computer file system

 

The metaphor here is a paper filing system — the bits of data on a computer are called “files,” and they’re organized in a “file system” the way paper files might be organized in file cabinets. There are different ways of organizing these files and storing data about them — “file systems.”

A file system can be thought of as an index or database containing the physical location of every piece of data on the hard drive or another storage device. The data is usually organized in folders called directories, which can contain other folders and files.

computer file system

 

For example, DOS, Windows, OS/2, Macintosh and Unix-based operating systems (OSes) all have file systems in which files are placed somewhere in a hierarchical (tree) structure. A file is placed in a directory (folder in Windows) or sub-directory at the desired place in the tree structure.

linux file system

 

But Why Are There So Many File Systems?

Not all file systems are equal. Different file systems have different ways of organizing their data. Some file systems are faster than others, some have additional security features, and some support drives with large storage capacities while others only work on drives with a smaller amount of storage. Some file systems are more robust and resistant to file corruption, while others trade that robustness for additional speed.

There’s no one best file system for all uses. Each operating system tends to use its own file system, which the operating system developers also work on. Microsoft, Apple, and the Linux kernel developers all work on their own file systems. New file systems could be faster, more stable, scale better to larger storage devices, and have more features than old ones.

An Overview of Common File Systems

Here’s a quick overview of some of the more common file systems you’ll encounter. It’s not exhaustive — there are many other different ones.

FAT32: FAT32 is an older Windows file system, but it’s still used on removable media devices — just the smaller ones, though. Larger external hard drives of 1 TB or so will likely come formatted with NTFS. You’ll only want to use this with small storage devices or for compatibility with other devices like digital cameras, game consoles, set-top boxes, and other devices that just support FAT32 and not the newer NTFS file system.

NTFS: Modern versions of Windows — since Windows XP — use the NTFS file system for their system partition. External drives can be formatted with either FAT32 or NTFS.

HFS+: Macs use HFS+ for their internal partitions, and they like to format external drives with HFS+ too — this is required to use an external drive with Time Machine so file system attributes can be properly backed up, for example. Macs can also read and write to FAT32 file systems, although they can only read from NTFS file systems by default — you’d need third-party software to write to NTFS file systems from a Mac.

Ext2/Ext3/Ext4: You’ll often see the Ext2, Ext3, and Ext4 file systems on Linux. Ext2 is an older file systems, and it lacks important features like journaling — if the power goes out or a computer crashes while writing to an ext2 drive, data may be lost. Ext3 adds these robustness features at the cost of some speed. Ext4 is more modern and faster — it’s the default file system on most Linux distributions now, and is faster. Windows and Mac don’t support these file systems — you’ll need a third-party tool to access files on such file systems. For this reason, it’s often ideal to format your Linux system partitions as ext4 and leave removable devices formatted with FAT32 or NTFS if you need compatibility with other operating systems. Linux can read and write to both FAT32 or NTFS.

XFS: a file system derived from SGI company and was initially used for company’s IRIX servers. Now XFS specifications are implemented in Linux. XFS file system has great performance and is widely used to store files.

Btrfs: Btrfs — “better file system” — is a newer Linux file system that’s still in development. It isn’t the default on most Linux distributions at this point, but it will probably replace Ext4 one day. The goal is to provide additional features that allow Linux to scale to larger amounts of storage.

Swap: On Linux, the “swap” file system isn’t really a file system. A partition formatted as “swap” can just be used as swap space by the operating system — it’s like the page file on Windows, but requires a dedicated partition.