The Most Important Linux File Systems
Tip
Linux supports a wide range of file systems. Each file system has different strengths and is suitable for specific use cases.
| File system | Typical use | Features |
|---|---|---|
| ext4 | Default for many Linux installations | Stable, reliable, and widely used |
| Btrfs | Modern Linux systems | Supports snapshots, checksums, and subvolumes |
| XFS | Servers and large storage devices | High performance when working with large files |
| ZFS | Servers and storage systems | Extensive storage management and data integrity features |
| FAT32 | USB flash drives and older devices | Good compatibility, but limited to files up to 4 GB |
| exFAT | Modern USB flash drives and SD cards | Supports large files and many operating systems |
| NTFS | Windows drives | Usually accessed on Linux through additional drivers |
On Linux, storage devices are not automatically assigned drive letters such as C: or D:. Instead, they are attached to the existing directory structure by being mounted.
/
βββ home/
βββ etc/
βββ usr/
βββ var/
βββ boot/
βββ tmp/
βββ mnt/
The top-level directory is called the root directory and is represented by /.
Important Directories
-
/homeβ Personal files belonging to users -
/rootβ The administratorβs home directory -
/etcβ Configuration files -
/usrβ Programs and libraries -
/varβ Variable data, such as log files -
/tmpβ Temporary files -
/devβ Devices that can be accessed by the system -
/mnt and /mediaβ Common mount points for storage devices -
/bootβ Files required to start the system
Viewing File Systems
The lsblk command displays storage devices and partitions:
lsblk
The df command shows the used and available space of mounted file systems:
df -h
The du command shows how much storage space a directory uses:
du -sh ~/Documents
The find command searches for PDF files in the Documents directory:
find ~/Documents -type f -name "*.pdf"
Mounting Storage Devices
For example, a storage device can be mounted with the following command:
sudo mount /dev/sdb1 /mnt
In this example, /dev/sdb1 is the partition and /mnt is the mount point.
After using the device, it can be unmounted with the following command:
sudo umount /mnt
On desktop systems, the graphical environment often handles mounting and unmounting automatically.