FSTAB(5) File Formats FSTAB(5)
NAME
fstab - static information about the filesystems
SYNOPSIS
/etc/fstab
DESCRIPTION
The file fstab contains descriptive information about the filesystems the system can mount. fstab is only read by programs, and not writ-
ten; it is the duty of the system administrator to properly create and maintain this file. The order of records in fstab is important
because fsck(8), mount(8), and umount(8) sequentially iterate through fstab doing their thing.
Each filesystem is described on a separate line. Fields on each line are separated by tabs or spaces. Lines starting with '#' are com-
ments. Blank lines are ignored.
The following is a typical example of an fstab entry:
LABEL=t-home2 /home ext4 defaults,auto_da_alloc 0 2
The first field (fs_spec).
This field describes the block special device or remote filesystem to be mounted.
For ordinary mounts, it will hold (a link to) a block special device node (as created by mknod(8)) for the device to be mounted,
like `/dev/cdrom' or `/dev/sdb7'. For NFS mounts, this field is <host>:<dir>, e.g., `knuth.aeb.nl:/'. For filesystems with no
storage, any string can be used, and will show up in df(1) output, for example. Typical usage is `proc' for procfs; `mem', `none',
or `tmpfs' for tmpfs. Other special filesystems, like udev and sysfs, are typically not listed in fstab.
LABEL=<label> or UUID=<uuid> may be given instead of a device name. This is the recommended method, as device names are often a
coincidence of hardware detection order, and can change when other disks are added or removed. For example, `LABEL=Boot' or
`UUID=3e6be9de-8139-11d1-9106-a43f08d823a6'. (Use a filesystem-specific tool like e2label(8), xfs_admin(8), or fatlabel(8) to set
LABELs on filesystems).
It's also possible to use PARTUUID= and PARTLABEL=. These partitions identifiers are supported for example for GUID Partition Table
(GPT).
See mount(8), blkid(8) or lsblk(8) for more details about device identifiers.
Note that mount(8) uses UUIDs as strings. The string representation of the UUID should be based on lower case characters.
The second field (fs_file).
This field describes the mount point (target) for the filesystem. For swap partitions, this field should be specified as `none'. If
the name of the mount point contains spaces or tabs these can be escaped as ` 40' and '