MTAB(5) COMMAND REFERENCE MTAB(5) NAME mtab - mounted file system table SYNOPSIS #include <mntent.h> #include <mtab.h> DESCRIPTION The file /etc/mtab contains a table of devices mounted by the mount(8) command; mount adds entries to the table; umount(8) removes entries. The table is a series of mtab structures, as defined in <mtab.h>: struct mtab { char m_path[32]; /* mounted on pathname */ char m_dname[32]; /* block device pathname */ char m_type[4]; /* read-only, quotas */ }; Each entry contains the null-padded name of the place where the special file is mounted, the null-padded name of the special file, and a type field, one of those defined in <fstab.h> . The special file has all its directories stripped away; that is, everything through the last `/' is thrown away. The type field indicates if the file system is mounted read- only, read-write, or read-write with disk quotas enabled. This table is present only as information to users. It does not matter to mount if there are duplicated entries nor to umount if a name cannot be found. The /etc/mtab file is structurally identical to the contents of /etc/fstab, described in fstab(5). There are a number of lines of the form fsname dir type opts freq passno An example of entries in the file is depicted here. /dev/xy0a / 4.2 rw,noquota 1 2 The file is accessed by programs using getmntent(3) and by the system administrator using a text editor. Printed 5/12/88 1
MTAB(5) COMMAND REFERENCE MTAB(5) FILES /etc/mtab SEE ALSO getmntent(3), fstab(5), mount(8). Printed 5/12/88 2
%%index%% na:240,84; sy:324,478; de:802,2095; fi:3209,86; se:3295,209; %%index%%000000000094