fstab

The fstab file is a list of hardware devices, file system drive mounts, and mount options. It can be found at /etc/fstab on a Linux system.

Additionally, running mount -a will loop through this file.


Configuration

This fstab file is structured as:

# <volume>    <dir>     <type> <options>   <dump> <fsck>
/dev/sda1     none      swap   defaults    0      2
/dev/sda2     /         ext4   rw,relatime 0      1
UUID=abcdefg  /mnt/hdd  ext4   rw,noatime  0      0

Spacing between columns is arbitrary. You can mix device filenames and volume UUIDs, though the latter are considered more durable. You can get the UUID of a volume with blkid. You can get the file system type of a device also with blkid.

Options

The <options> column can contain any of:

dump

The <dump> column is used by the dump utility. If you don't need that utility (and most people don't), set it to 0.

fsck

The <fsck> column is used by the fsck utility, and enables boot-time file system checks.


CategoryRicottone