linux - mount (8)
NAME
mount, umount - mount and dismount file systems
SYNOPSIS
mount [-afrwuvn] [-t vfstype]
mount [-frwuvn] [-o remount [,...]] special | node
mount [-frwun] [-t vfstype] [-o options] special node
umount [-ahvV] [-t vfstype]
umount [-v] special | node [...]
DESCRIPTION
The mount command calls the mount(2) system call to pre-
pare and graft a special device on to the file system tree
at the point node. If either special or node are not pro-
vided, the appropriate information is taken from the
fstab(5) file. The proc file system is not associated
with a special device, and when mounting it, an arbitrary
keyword, such as proc can be used instead of a path or
node specification. (The customary choice none is less
fortunate: the error message `none busy' from umount can
be confusing.)
The system maintains a list of currently mounted file sys-
tems. If no arguments are given to mount, this list is
printed.
Options available for the mount command:
-f Causes everything to be done except for the actual
system call; if it's not obvious, this ``fakes''
mounting the file system. This option is useful in
conjunction with the -v flag to determine what the
mount command is trying to do.
-o Options are specified with a -o flag followed by a
comma separated string of options. N.B., many of
these options are only useful when they appear in
the /etc/fstab file. The following options apply
to any file system that is being mounted:
async All I/O to the file system should be done
asynchronously.
auto Can be mounted with the -a option.
defaults
Use default options: rw, suid, dev, exec,
auto, nouser, and async.
dev Interpret character or block special devices
on the file system.
noauto Can only be mounted explicitly (i.e., the -a
option will not cause the file system to be
mounted).
nodev Do not interpret character or block special
devices on the file system. This options is
useful for a server that has file systems
containing special devices for architectures
other than its own.
noexec Do not allow execution of any binaries on
the mounted file system. This options is
useful for a server that has file systems
containing binaries for architectures other
than its own.
nosuid Do not allow set-user-identifier or set-
group-identifier bits to take effect.
nouser Forbid an ordinary (i.e., non-root) user to
mount the file system.
remount
Attempt to remount an already-mounted file
system. This is commonly used to change the
mount flags for a file system, especially to
make a readonly file system writeable.
ro Mount the file system read-only.
rw Mount the file system read-write.
suid Allow set-user-identifier or set-group-iden-
tifier bits to take effect.
sync All I/O to the file system should be done
synchronously.
user Allow an ordinary user to mount the file
system. Ordinary users always have the fol-
lowing options activated: noexec, nosuid,
and nodev (unless overridden by the supe-
ruser by using, for example, the following
option line: user,exec,dev,suid.
The following options apply only to certain file
systems:
case=value
For the hpfs file system, specify case as
lower or asis.
some more checks while the file system is
mounted. Currently (1.3.11), the following
values can be specified with this option:
none no extra check is performed by the
kernel code
normal The inodes and blocks bitmaps are
checked when the file system is
mounted (this is the default)
strict In addition to the normal checks,
block deallocation checks that the
block to free is in the data zone.
check=value
For the msdos file system, three different
levels of pickyness can be chosen:
relaxed
Upper and lower case are accepted
and equivalent, long name parts are
truncated (e.g. verlongname.foobar
becomes verylong.foo), leading and
embedded spaces are accepted in each
name part (name and extension).
normal Like "relaxed", but many special
characters (*, ?, <, spaces, etc.)
are rejected. This is the default.
strict Like "normal", but names may not
contain long parts and special char-
acters that are sometimes used on
Linux, but are not accepted by MS-
DOS are rejected. (+, =, spaces,
etc.)
conv=value
For the msdos, hpfs, and iso9660 file sys-
tems, specify file conversion as binary,
text, or auto. The iso9660 file system also
allows value to be mtext.
The msdos file system can perform CRLF<-->NL
(MS-DOS text format to UNIX text format)
conversion in the kernel. The following con-
version modes are available:
binary no translation is performed. This
is the default.
auto CRLF<-->NL translation is performed
on all files that don't have a
"well-known binary" extension. The
list of known extensions can be
found at the beginning of
fs/msdos/misc.c (as of 1.3.11, the
list is: exe, com, bin, app, sys,
drv, ovl, ovr, obj, lib, dll, pif,
arc, zip, lha, lzh, zoo, tar, z,
arj, tz, taz, tzp, tpz, gz, tgz,
deb, gif, bmp, tif, gl, jpg, pcx,
tfm, vf, gf, pk, pxl, dvi).
Programs that do computed lseeks won't like
in-kernel text conversion. Several people
have had their data ruined by this transla-
tion. Beware!
For file systems mounted in binary mode, a
conversion tool (fromdos/todos) is avail-
able.
block=value
For the iso9660 file system, set the block-
size.
bsdgroups
See grpid
cruft For the iso9660 file system, set the cruft
flag to 'y'. This option is available
because there are buggy premastering pro-
grams out there that leave junk in the top
byte of the file size. This option clears
the top byte, but restricts files to 16Mb
maximum in the process.
debug For the msdos file system, turn on the debug
flag. A version string and a list of file
system parameters will be printed (these
data are also printed if the parameters
appear to be inconsistent).
debug For the ext2fs file system, causes the ker-
nel code to display the file system parame-
ters when the file system is mounted.
errors=value
For the ext2fs file system, specifies the
error behavior:
continue
erroneous). This is the default.
remount
ro The file system is remounted read
only, and subsequent writes are
refused.
panic When an error is detected, the sys-
tem panics.
fat=value
For the msdos file system, specify either a
12 bit fat or a 16 bit fat. This overrides
the automatic FAT type detection routine.
Use with caution!
gid=value
For the msdos and hpfs file systems, give
every file a gid equal to value.
grpid Causes the ext2fs to use the BSD behavior
when creating files: file are created with
the group id of their parent directory.
map=value
For the iso9660 file system, specify mapping
as off or normal. In general, non-Rock
Ridge discs have all of the filenames in
upper case, and all of the filenames have a
";1" appended. The map option strips the
";1" and makes the name lower case. C.f.
norock.
nocheck
For the ext2fs, turns of checking (see
check=none).
nogrpid
Causes the ext2fs to use the System V
behaviour when creating files: files are
created with the group id of the creating
process, unless the setgid bit is set on the
parent directory. This is the default for
all Linux file systems.
norock Normal iso9600 filenames appear in a 8.3
format (i.e., DOS-like restrictions on file-
name length), and in addition all characters
are in upper case. Also there is no field
for file ownership, protection, number of
links, provision for block/character
Rock Ridge is an extension to iso9660 that
provides all of these unix like features.
Basically there are extensions to each
directory record that supply all of the
additional information, and when Rock Ridge
is in use, the filesystem is indistinguish-
able from a normal UNIX file system (except
that it is read-only, of course).
The norock switch disables the use of Rock
Ridge extensions, even if available. C.f.
map.
quiet For the msdos file system, turn on the quiet
flag. Attempts to chown or chmod files do
not yield errors, although they fail. Use
with caution!
soft For the nfs file system this allows the ker-
nel to time out if the nfs server is not
responding for some time, otherwise it will
try forever. The time can be specified with
timeo=time. For more information look at
nfs(5).
This option is useful if your nfs server
sometimes doesn't respond or will be
rebooted while some process tries to get a
file from the server.
sb=value
For the ext2 file system, use an alternate
superblock located at block value. value is
numbered in 1024 bytes blocks. An ext2 file
system usually has backups of the super
block at blocks 1, 8193, 16385 and so on.
sysvgroups
See nogrpid
uid=value
For the msdos and hpfs file systems, give
every file a uid equal to value.
umask=value
For the msdos and hpfs file systems, give
every file a umask of value. The radix
defaults to octal.
The full set of options applied is determined by
first extracting the options for the file system
from the fstab table, then applying any options
If the msdos file system detects an inconsistency,
it reports an error and sets the file system read-
only. The file system can be made writeable again
by remounting it.
-r The file system object is to be mounted read-only.
-t vfstype
The argument following the -t is used to indicate
the file system type. The file system types which
are currently supported are listed in
linux/fs/filesystems.c: minix, ext, ext2, xiafs,
msdos, umsdos, hpfs, proc, nfs, iso9660, smbfs,
sysv, xenix, coherent. Note that that last three
are equivalent and that "xenix" and "coherent" will
be removed at some point in the future -- use
"sysv" instead.
The type minix is the default. If no -t option is
given, or if the "auto" type is specified, the
superblock is probed for the filesystem type
(minix, ext, ext2, xia are supported). If this
probe fails and /proc/filesystems exists, then all
of the filesystems listed will be tried, except for
those that are labeled "nodev" (e.g., "proc" and
"nfs").
Note that the "auto" type may be useful for user-
mounted floppies.
For example, the mount command:
mount -a -t nomsdos,ext
mounts all file systems except those of type msdos
and ext.
-v Verbose mode.
-w The file system object is to be read and write.
-n Mount without writing in /etc/mtab.
Umount removes the special device, or the device grafted
at point node, from the file system tree.
Options for the umount command:
-a All of the file systems described in /etc/mtab are
unmounted.
-t vfstype
than one type may be specified in a comma separated
list. The list of file system types can be pre-
fixed with ``no'' to specify the file system types
on which no action should be taken. (See example
above for the mount command.)
-V Print version and exit.
-h Print help message and exit.
-v Verbose mode.
FILES
/etc/fstab file system table
/etc/mtab~ lock file
/etc/mtab.tmp temporary file
SEE ALSO
mount(2), umount(2), fstab(5), swapon(8), nfs(5),
mountd(8), nfsd(8)
BUGS
It is possible for a corrupted file system to cause a
crash.
Some Linux file systems don't support -o synchronous (the
ext2fs does support synchronous updates (a la BSD) when
mounted with the sync option).
The -o remount may not be able to change mount parameters
(all ext2fs parameters, except sb, are changeable with a
remount, for example, but you can't change gid or umask
for the dosfs).
HISTORY
A mount command appeared in Version 6 AT&T UNIX.
AUTHORS AND CONTRIBUTORS
The Linux mount command has a long and continuing history.
Major releases are noted below, with the name of the pri-
mary modifier noted:
0.97.3: Doug Quale (quale@saavik.cs.wisc.edu).
0.98.5: H. J. Lu (hlu@eecs.wsu.edu).
0.99.2: Rick Sladkey (jrs@world.std.com).
0.99.6: Rick Sladkey (jrs@world.std.com).
0.99.10: Stephen Tweedie (sct@dcs.ed.ac.uk).
0.99.14: Rick Sladkey (jrs@world.std.com).
(File-system specific information added to man page on 27
November 1993 by Rik Faith with lots of information and