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