1FSTAB(5)                         File formats                         FSTAB(5)
2
3
4

NAME

6       fstab - static information about the filesystems
7

SYNOPSIS

9       /etc/fstab
10

DESCRIPTION

12       The file fstab contains descriptive information about the filesystems
13       the system can mount. fstab is only read by programs, and not written;
14       it is the duty of the system administrator to properly create and
15       maintain this file. The order of records in fstab is important because
16       fsck(8), mount(8), and umount(8) sequentially iterate through fstab
17       doing their thing.
18
19       Each filesystem is described on a separate line. Fields on each line
20       are separated by tabs or spaces. Lines starting with '#' are comments.
21       Blank lines are ignored.
22
23       The following is a typical example of an fstab entry:
24
25           LABEL=t-home2   /home      ext4    defaults,auto_da_alloc      0  2
26
27   The first field (fs_spec).
28       This field describes the block special device, remote filesystem or
29       filesystem image for loop device to be mounted or swap file or swap
30       partition to be enabled.
31
32       For ordinary mounts, it will hold (a link to) a block special device
33       node (as created by mknod(2)) for the device to be mounted, like
34       /dev/cdrom or /dev/sdb7. For NFS mounts, this field is <host>:<dir>,
35       e.g., knuth.aeb.nl:/. For filesystems with no storage, any string can
36       be used, and will show up in df(1) output, for example. Typical usage
37       is proc for procfs; mem, none, or tmpfs for tmpfs. Other special
38       filesystems, like udev and sysfs, are typically not listed in fstab.
39
40       LABEL=<label> or UUID=<uuid> may be given instead of a device name.
41       This is the recommended method, as device names are often a coincidence
42       of hardware detection order, and can change when other disks are added
43       or removed. For example, 'LABEL=Boot' or
44       'UUID=3e6be9de-8139-11d1-9106-a43f08d823a6'. (Use a filesystem-specific
45       tool like e2label(8), xfs_admin(8), or fatlabel(8) to set LABELs on
46       filesystems).
47
48       It’s also possible to use PARTUUID= and PARTLABEL=. These partitions
49       identifiers are supported for example for GUID Partition Table (GPT).
50
51       See mount(8), blkid(8) or lsblk(8) for more details about device
52       identifiers.
53
54       Note that mount(8) uses UUIDs as strings. The string representation of
55       the UUID should be based on lower case characters. But when specifying
56       the volume ID of FAT or NTFS file systems upper case characters are
57       used (e.g UUID="A40D-85E7" or UUID="61DB7756DB7779B3").
58
59   The second field (fs_file).
60       This field describes the mount point (target) for the filesystem. For
61       swap partitions, this field should be specified as `none'. If the name
62       of the mount point contains spaces or tabs these can be escaped as
63       `\040' and '\011' respectively.
64
65   The third field (fs_vfstype).
66       This field describes the type of the filesystem. Linux supports many
67       filesystem types: ext4, xfs, btrfs, f2fs, vfat, ntfs, hfsplus, tmpfs,
68       sysfs, proc, iso9660, udf, squashfs, nfs, cifs, and many more. For more
69       details, see mount(8).
70
71       An entry swap denotes a file or partition to be used for swapping, cf.
72       swapon(8). An entry none is useful for bind or move mounts.
73
74       More than one type may be specified in a comma-separated list.
75
76       mount(8) and umount(8) support filesystem subtypes. The subtype is
77       defined by '.subtype' suffix. For example 'fuse.sshfs'. It’s
78       recommended to use subtype notation rather than add any prefix to the
79       first fstab field (for example 'sshfs#example.com' is deprecated).
80
81   The fourth field (fs_mntops).
82       This field describes the mount options associated with the filesystem.
83
84       It is formatted as a comma-separated list of options. It contains at
85       least the type of mount (ro or rw), plus any additional options
86       appropriate to the filesystem type (including performance-tuning
87       options). For details, see mount(8) or swapon(8).
88
89       Basic filesystem-independent options are:
90
91       defaults
92           use default options: rw, suid, dev, exec, auto, nouser, and async.
93
94       noauto
95           do not mount when mount -a is given (e.g., at boot time)
96
97       user
98           allow a user to mount
99
100       owner
101           allow device owner to mount
102
103       comment
104           or x-<name> for use by fstab-maintaining programs
105
106       nofail
107           do not report errors for this device if it does not exist.
108
109   The fifth field (fs_freq).
110       This field is used by dump(8) to determine which filesystems need to be
111       dumped. Defaults to zero (don’t dump) if not present.
112
113   The sixth field (fs_passno).
114       This field is used by fsck(8) to determine the order in which
115       filesystem checks are done at boot time. The root filesystem should be
116       specified with a fs_passno of 1. Other filesystems should have a
117       fs_passno of 2. Filesystems within a drive will be checked
118       sequentially, but filesystems on different drives will be checked at
119       the same time to utilize parallelism available in the hardware.
120       Defaults to zero (don’t check the filesystem) if not present.
121

FILES

123       /etc/fstab, <fstab.h>
124

NOTES

126       The proper way to read records from fstab is to use the routines
127       getmntent(3) or libmount.
128
129       The keyword ignore as a filesystem type (3rd field) is no longer
130       supported by the pure libmount based mount utility (since util-linux
131       v2.22).
132

HISTORY

134       The ancestor of this fstab file format appeared in 4.0BSD.
135

SEE ALSO

137       getmntent(3), fs(5), findmnt(8), mount(8), swapon(8)
138

REPORTING BUGS

140       For bug reports, use the issue tracker at
141       https://github.com/util-linux/util-linux/issues.
142

AVAILABILITY

144       fstab is part of the util-linux package which can be downloaded from
145       Linux Kernel Archive
146       <https://www.kernel.org/pub/linux/utils/util-linux/>.
147
148
149
150util-linux 2.38                   2022-01-06                          FSTAB(5)
Impressum