Linux / Unix - File System

Updated: 2020-06-29

Check Your File System

File System Types

$ df -Th

You may find other filesystem like:

  • tmpfs: a common name for a mounted file system, but stored in volatile memory instead of a persistent storage device
  • drvfs: mounted Windows disks, seen in Windows Subsystem for Linux (WSL). e.g. C:\ will be /mnt/c, and D:\ will be /mnt/d

List All Block Devices and Partitions

$ cat /proc/partitions
major minor  #blocks  name

253        0   31457280 vda
253       16   62914560 vdb
253       32      65536 vdc
253       48  251658240 vdd

Use file -s <device> to check type

$ sudo file -s /dev/vda
/dev/vda: Linux rev 1.0 ext4 filesystem data, UUID=6f54f78f-3f47-488c-ab1b-b1b8a596c2d3, volume name "c3image-rootfs" (needs journal recovery) (extents) (large files) (huge files)


FUSE: Filesystem in Userspace. The interface that lets non-privileged users create their own file systems without editing kernel code; a "bridge" to the actual kernel interfaces. E.g. GlusterFS, GmailFS.


Default File Systems

  • macOS/iOS: APFS, Apple File System

    • replaces HFS+
    • optimized for flash and solid-state drive storage, with a primary focus on encryption
    • APFS supports 64-bit inode numbers, supporting over 9 quintillion files on a single volume
  • Windows 10: NTFS
  • Red Hat/CentOS: XFS
  • gvfs: GNOME Virtual file system. GNOME's userspace virtual filesystem.