/etc/fstab (filesystem table) lists the filesystems to be mounted automatically at boot. Each line has six fields: the source device (by path, UUID, or label), the mount point, the filesystem type, mount options, a dump-backup flag (obsolete), and the fsck pass number. A typical line:
UUID=1234-5678 /boot/efi vfat defaults,umask=0077 0 1
UUID=abcd-ef00 / ext4 defaults,noatime 0 1
UUID=1111-2222 /home ext4 defaults,noatime 0 2
tmpfs /tmp tmpfs defaults,size=2G 0 0
Using UUIDs (from blkid) rather than device paths like /dev/sda1 is strongly recommended: device-name ordering can change between boots when disks are added or moved. On systemd-based systems, fstab entries are read by systemd-fstab-generator and turned into mount units at boot, which means they participate in dependency ordering and can use systemd-specific options like x-systemd.automount.
Test new fstab entries before rebooting—a typo can leave the system unable to boot. sudo mount -a attempts to mount everything in fstab that is not yet mounted; sudo findmnt --verify specifically checks fstab for errors. Network filesystems should use options like nofail and _netdev so that the boot does not hang if the network is unavailable.
Related terms: mount
Discussed in:
- Chapter 4: The Filesystem Hierarchy — /etc — Configuration
Also defined in: Textbook of Linux