1FSTAB(5)                   Linux Programmer's Manual                  FSTAB(5)
2
3
4

NAME

6       fstab - static information about the filesystems
7

SYNOPSIS

9       #include <fstab.h>
10

DESCRIPTION

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.  The order of records in fstab  is  important  because  fsck(8),
18       mount(8),  and umount(8) sequentially iterate through fstab doing their
19       thing.
20
21       The first field, (fs_spec),  describes  the  block  special  device  or
22       remote filesystem to be mounted.
23
24       For  ordinary  mounts  it  will hold (a link to) a block special device
25       node (as created by mknod(8))  for  the  device  to  be  mounted,  like
26       `/dev/cdrom'   or   `/dev/sdb7'.    For   NFS   mounts  one  will  have
27       <host>:<dir>, e.g., `knuth.aeb.nl:/'.  For procfs, use `proc'.
28
29       Instead of giving the device explicitly, one may indicate the (ext2  or
30       xfs)  filesystem that is to be mounted by its UUID or volume label (cf.
31       e2label(8) or  xfs_admin(8)),  writing  LABEL=<label>  or  UUID=<uuid>,
32       e.g.,   `LABEL=Boot'   or  `UUID=3e6be9de-8139-11d1-9106-a43f08d823a6'.
33       This will make the system more robust: adding or removing a  SCSI  disk
34       changes the disk device name but not the filesystem volume label.
35
36       The second field, (fs_file), describes the mount point for the filesys‐
37       tem.  For swap partitions, this field should be specified as `none'. If
38       the  name  of  the  mount point contains spaces these can be escaped as
39       `\040'.
40
41       The third field, (fs_vfstype), describes the type  of  the  filesystem.
42       Linux  supports  lots  of filesystem types, such as adfs, affs, autofs,
43       coda, coherent, cramfs, devpts, efs, ext2, ext3,  hfs,  hpfs,  iso9660,
44       jfs,  minix,  msdos,  ncpfs,  nfs,  ntfs,  proc, qnx4, reiserfs, romfs,
45       smbfs, sysv, tmpfs, udf, ufs, umsdos, vfat, xenix,  xfs,  and  possibly
46       others.  For more details, see mount(8).  For the filesystems currently
47       supported by the running kernel, see /proc/filesystems.  An entry  swap
48       denotes a file or partition to be used for swapping, cf. swapon(8).  An
49       entry ignore causes the line to be ignored.  This  is  useful  to  show
50       disk  partitions  which  are currently unused.  An entry none is useful
51       for bind or move mounts.
52
53       The fourth field, (fs_mntops), describes the mount  options  associated
54       with the filesystem.
55
56       It  is  formatted as a comma separated list of options.  It contains at
57       least the type of mount plus any additional options appropriate to  the
58       filesystem  type.   For documentation on the available options for non-
59       nfs file systems, see mount(8).  For documentation on all  nfs-specific
60       options have a look at nfs(5).  Common for all types of file system are
61       the options ``noauto'' (do not mount when "mount -a" is given, e.g., at
62       boot  time),  ``user''  (allow  a  user to mount), and ``owner'' (allow
63       device owner to mount), and ``comment'' (e.g., for use  by  fstab-main‐
64       taining  programs).   The  ``owner'' and ``comment'' options are Linux-
65       specific.  For more details, see mount(8).
66
67       The fifth field, (fs_freq),  is  used  for  these  filesystems  by  the
68       dump(8)  command  to determine which filesystems need to be dumped.  If
69       the fifth field is not present, a value of zero is  returned  and  dump
70       will assume that the filesystem does not need to be dumped.
71
72       The  sixth field, (fs_passno), is used by the fsck(8) program to deter‐
73       mine the order in which filesystem checks are done at reboot time.  The
74       root  filesystem  should  be specified with a fs_passno of 1, and other
75       filesystems should have a fs_passno of 2.  Filesystems within  a  drive
76       will  be checked sequentially, but filesystems on different drives will
77       be checked at the same time to utilize  parallelism  available  in  the
78       hardware.   If  the sixth field is not present or zero, a value of zero
79       is returned and fsck will assume that the filesystem does not  need  to
80       be checked.
81
82       The proper way to read records from fstab is to use the routines getmn‐
83       tent(3).
84

FILES

86       /etc/fstab
87

SEE ALSO

89       getmntent(3), mount(8), swapon(8), fs(5), nfs(5)
90

HISTORY

92       The ancestor of this fstab file format appeared in 4.0BSD.
93

AVAILABILITY

95       This man page is part of the util-linux-ng  package  and  is  available
96       from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
97
98
99
100Linux 2.2                        15 June 1999                         FSTAB(5)
Impressum