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 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, 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.
60
61       The second field (fs_file).
62              This field describes the mount point (target) for  the  filesys‐
63              tem.   For  swap  partitions,  this field should be specified as
64              `none'. If the name of the mount point contains spaces  or  tabs
65              these can be escaped as `\040' and '\011' respectively.
66
67       The third field (fs_vfstype).
68              This field describes the type of the filesystem.  Linux supports
69              many filesystem types: ext4, xfs, btrfs, f2fs, vfat, ntfs,  hfs‐
70              plus, tmpfs, sysfs, proc, iso9660, udf, squashfs, nfs, cifs, and
71              many more.  For more details, see mount(8).
72
73              An entry swap denotes a file or partition to be used  for  swap‐
74              ping,  cf.  swapon(8).  An entry none is useful for bind or move
75              mounts.
76
77              More than one type may be specified in a comma-separated list.
78
79              mount(8) and umount(8) support filesystem subtypes.  The subtype
80              is defined by '.subtype' suffix.  For example 'fuse.sshfs'. It's
81              recommended to use subtype notation rather than add  any  prefix
82              to  the  first  fstab  field (for example 'sshfs#example.com' is
83              deprecated).
84
85       The fourth field (fs_mntops).
86              This field describes  the  mount  options  associated  with  the
87              filesystem.
88
89              It  is  formatted as a comma-separated list of options.  It con‐
90              tains at least the type of mount (ro or rw), plus any additional
91              options  appropriate  to  the filesystem type (including perfor‐
92              mance-tuning options).  For details, see mount(8) or swapon(8).
93
94              Basic filesystem-independent options are:
95
96              defaults
97                     use default options: rw, suid, dev, exec,  auto,  nouser,
98                     and async.
99
100              noauto do  not  mount  when  "mount  -a" is given (e.g., at boot
101                     time)
102
103              user   allow a user to mount
104
105              owner  allow device owner to mount
106
107              comment
108                     or x-<name> for use by fstab-maintaining programs
109
110              nofail do not report errors for  this  device  if  it  does  not
111                     exist.
112
113       The fifth field (fs_freq).
114              This  field  is  used  by dump(8) to determine which filesystems
115              need to be  dumped.   Defaults  to  zero  (don't  dump)  if  not
116              present.
117
118       The sixth field (fs_passno).
119              This  field  is  used by fsck(8) to determine the order in which
120              filesystem checks are done at boot time.   The  root  filesystem
121              should  be  specified  with a fs_passno of 1.  Other filesystems
122              should have a fs_passno of 2.  Filesystems within a  drive  will
123              be  checked  sequentially,  but  filesystems on different drives
124              will be checked at the same time to utilize  parallelism  avail‐
125              able  in  the  hardware.   Defaults  to zero (don't fsck) if not
126              present.
127
128

FILES

130       /etc/fstab, <fstab.h>
131
132

NOTES

134       The proper way to read records from fstab is to use the routines getmn‐
135       tent(3) or libmount.
136
137       The  keyword  ignore as a filesystem type (3rd field) is no longer sup‐
138       ported by the pure  libmount  based  mount  utility  (since  util-linux
139       v2.22).
140

HISTORY

142       The ancestor of this fstab file format appeared in 4.0BSD.
143

SEE ALSO

145       getmntent(3), fs(5), findmnt(8), mount(8), swapon(8)
146

AVAILABILITY

148       This  man  page is part of the util-linux package and is available from
149       https://www.kernel.org/pub/linux/utils/util-linux/.
150
151
152
153util-linux                       February 2015                        FSTAB(5)
Impressum