1FSTAB(5) File Formats FSTAB(5)
2
3
4
6 fstab - static information about the filesystems
7
9 /etc/fstab
10
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 main‐
15 tain this file. The order of records in fstab is important because
16 fsck(8), mount(8), and umount(8) sequentially iterate through fstab do‐
17 ing 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
26 2
27
28 The first field (fs_spec).
29 This field describes the block special device, remote filesystem
30 or filesystem image for loop device to be mounted or swap file
31 or swap partition to be enabled.
32
33 For ordinary mounts, it will hold (a link to) a block special
34 device node (as created by mknod(2)) for the device to be
35 mounted, like `/dev/cdrom' or `/dev/sdb7'. For NFS mounts, this
36 field is <host>:<dir>, e.g., `knuth.aeb.nl:/'. For filesystems
37 with no storage, any string can be used, and will show up in
38 df(1) output, for example. Typical usage is `proc' for procfs;
39 `mem', `none', or `tmpfs' for tmpfs. Other special filesystems,
40 like udev and sysfs, are typically not listed in fstab.
41
42 LABEL=<label> or UUID=<uuid> may be given instead of a device
43 name. This is the recommended method, as device names are often
44 a coincidence of hardware detection order, and can change when
45 other disks are added or removed. For example, `LABEL=Boot' or
46 `UUID=3e6be9de-8139-11d1-9106-a43f08d823a6'. (Use a filesystem-
47 specific tool like e2label(8), xfs_admin(8), or fatlabel(8) to
48 set LABELs on filesystems).
49
50 It's also possible to use PARTUUID= and PARTLABEL=. These parti‐
51 tions identifiers are supported for example for GUID Partition
52 Table (GPT).
53
54 See mount(8), blkid(8) or lsblk(8) for more details about device
55 identifiers.
56
57
58 Note that mount(8) uses UUIDs as strings. The string representa‐
59 tion of the UUID should be based on lower case characters. But
60 when specifying the volume ID of FAT or NTFS file systems upper
61 case characters are used (e.g UUID="A40D-85E7" or
62 UUID="61DB7756DB7779B3").
63
64 The second field (fs_file).
65 This field describes the mount point (target) for the filesys‐
66 tem. For swap partitions, this field should be specified as
67 `none'. If the name of the mount point contains spaces or tabs
68 these can be escaped as `\040' and '\011' respectively.
69
70 The third field (fs_vfstype).
71 This field describes the type of the filesystem. Linux supports
72 many filesystem types: ext4, xfs, btrfs, f2fs, vfat, ntfs, hfs‐
73 plus, tmpfs, sysfs, proc, iso9660, udf, squashfs, nfs, cifs, and
74 many more. For more details, see mount(8).
75
76 An entry swap denotes a file or partition to be used for swap‐
77 ping, cf. swapon(8). An entry none is useful for bind or move
78 mounts.
79
80 More than one type may be specified in a comma-separated list.
81
82 mount(8) and umount(8) support filesystem subtypes. The subtype
83 is defined by '.subtype' suffix. For example 'fuse.sshfs'. It's
84 recommended to use subtype notation rather than add any prefix
85 to the first fstab field (for example 'sshfs#example.com' is
86 deprecated).
87
88 The fourth field (fs_mntops).
89 This field describes the mount options associated with the
90 filesystem.
91
92 It is formatted as a comma-separated list of options. It con‐
93 tains at least the type of mount (ro or rw), plus any additional
94 options appropriate to the filesystem type (including perfor‐
95 mance-tuning options). For details, see mount(8) or swapon(8).
96
97 Basic filesystem-independent options are:
98
99 defaults
100 use default options: rw, suid, dev, exec, auto, nouser,
101 and async.
102
103 noauto do not mount when "mount -a" is given (e.g., at boot
104 time)
105
106 user allow a user to mount
107
108 owner allow device owner to mount
109
110 comment
111 or x-<name> for use by fstab-maintaining programs
112
113 nofail do not report errors for this device if it does not ex‐
114 ist.
115
116 The fifth field (fs_freq).
117 This field is used by dump(8) to determine which filesystems
118 need to be dumped. Defaults to zero (don't dump) if not
119 present.
120
121 The sixth field (fs_passno).
122 This field is used by fsck(8) to determine the order in which
123 filesystem checks are done at boot time. The root filesystem
124 should be specified with a fs_passno of 1. Other filesystems
125 should have a fs_passno of 2. Filesystems within a drive will
126 be checked sequentially, but filesystems on different drives
127 will be checked at the same time to utilize parallelism avail‐
128 able in the hardware. Defaults to zero (don't fsck) if not
129 present.
130
131
133 /etc/fstab, <fstab.h>
134
135
137 The proper way to read records from fstab is to use the routines getmn‐
138 tent(3) or libmount.
139
140 The keyword ignore as a filesystem type (3rd field) is no longer sup‐
141 ported by the pure libmount based mount utility (since util-linux
142 v2.22).
143
145 The ancestor of this fstab file format appeared in 4.0BSD.
146
148 getmntent(3), fs(5), findmnt(8), mount(8), swapon(8)
149
151 This man page is part of the util-linux package and is available from
152 https://www.kernel.org/pub/linux/utils/util-linux/.
153
154
155
156util-linux February 2015 FSTAB(5)