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 various file
13 systems. fstab is only read by programs, and not written; it is the
14 duty of the system administrator to properly create and maintain this
15 file. Each filesystem is described on a separate line; fields on each
16 line are separated by tabs or spaces. Lines starting with '#' are com‐
17 ments, blank lines are ignored. The order of records in fstab is impor‐
18 tant because fsck(8), mount(8), and umount(8) sequentially iterate
19 through fstab doing their thing.
20
21 The first field (fs_spec).
22 This field describes the block special device or remote filesys‐
23 tem to be mounted.
24
25 For ordinary mounts it will hold (a link to) a block special
26 device node (as created by mknod(8)) for the device to be
27 mounted, like `/dev/cdrom' or `/dev/sdb7'. For NFS mounts one
28 will have <host>:<dir>, e.g., `knuth.aeb.nl:/'. For procfs, use
29 `proc'.
30
31 Instead of giving the device explicitly, one may indicate the
32 filesystem that is to be mounted by its UUID or LABEL (cf.
33 e2label(8) or xfs_admin(8)), writing LABEL=<label> or
34 UUID=<uuid>, e.g., `LABEL=Boot' or `UUID=3e6be9de-8139-11d1‐
35 -9106-a43f08d823a6'.
36
37 It's also possible to use PARTUUID= and PARTLABEL=. These parti‐
38 tions identifiers are supported for GUID Partition Table (GPT)
39 and MAC partition table only.
40
41 See blkid(8) or lsblk(8) for more details about devices identi‐
42 fiers.
43
44
45 Note that mount(8) uses UUIDs as strings. The string representa‐
46 tion of the UUID should be based on lower case characters.
47
48 The second field (fs_file).
49 This field describes the mount point for the filesystem. For
50 swap partitions, this field should be specified as `none'. If
51 the name of the mount point contains spaces these can be escaped
52 as `\040'.
53
54 The third field (fs_vfstype).
55 This field describes the type of the filesystem. Linux supports
56 lots of filesystem types, such as adfs, affs, autofs, coda,
57 coherent, cramfs, devpts, efs, ext2, ext3, hfs, hpfs, iso9660,
58 jfs, minix, msdos, ncpfs, nfs, ntfs, proc, qnx4, reiserfs,
59 romfs, smbfs, sysv, tmpfs, udf, ufs, umsdos, vfat, xenix, xfs,
60 and possibly others. For more details, see mount(8).
61
62 For the filesystems currently supported by the running kernel,
63 see /proc/filesystems.
64
65 An entry swap denotes a file or partition to be used for swap‐
66 ping, cf. swapon(8). An entry none is useful for bind or move
67 mounts.
68
69 mount(8) and umount(8) support filesystem subtypes. The subtype
70 is defined by '.subtype' suffix. For example 'fuse.sshfs'. It's
71 recommended to use subtype notation rather than add any prefix
72 to the first fstab field (for example 'sshfs#example.com' is
73 deprecated).
74
75 The fourth field (fs_mntops).
76 This field describes the mount options associated with the
77 filesystem.
78
79 It is formatted as a comma separated list of options. It con‐
80 tains at least the type of mount plus any additional options
81 appropriate to the filesystem type. For documentation on the
82 available mount options, see mount(8). For documentation on the
83 available swap options, see swapon(8).
84
85 Basic file system independent options are:
86
87 defaults
88 use default options: rw, suid, dev, exec, auto, nouser,
89 and async.
90
91 noauto do not mount when "mount -a" is given (e.g., at boot
92 time)
93
94 user allow a user to mount
95
96 owner allow device owner to mount
97
98 comment
99 or x-<name> for use by fstab-maintaining programs
100
101 nofail do not report errors for this device if it does not
102 exist.
103
104 The fifth field (fs_freq).
105 This field is used for these filesystems by the dump(8) command
106 to determine which filesystems need to be dumped. If the fifth
107 field is not present, a value of zero is returned and dump will
108 assume that the filesystem does not need to be dumped.
109
110 The sixth field (fs_passno).
111 This field is used by the fsck(8) program to determine the order
112 in which filesystem checks are done at reboot time. The root
113 filesystem should be specified with a fs_passno of 1, and other
114 filesystems should have a fs_passno of 2. Filesystems within a
115 drive will be checked sequentially, but filesystems on different
116 drives will be checked at the same time to utilize parallelism
117 available in the hardware. If the sixth field is not present or
118 zero, a value of zero is returned and fsck will assume that the
119 filesystem does not need to be checked.
120
121
123 The proper way to read records from fstab is to use the routines getmn‐
124 tent(3) or libmount.
125
126 The keyword ignore as filesystem type (3rd field) is not more supported
127 by the pure libmount based mount utility (since util-linux v2.22).
128
129
131 /etc/fstab, <fstab.h>
132
134 findmnt(8), mount(8), swapon(8), fs(5), getmntent(3)
135
137 The ancestor of this fstab file format appeared in 4.0BSD.
138
140 This man page is part of the util-linux package and is available from
141 ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
142
143
144
145util-linux August 2010 FSTAB(5)