The�mount�command�mounts�a�storage device�or�filesystem, making it accessible and
attaching it to an existing�directory�structure.
The�umount�command "unmounts" a mounted filesystem, informing the system to
complete any pending�read�or�write�operations, and safely detaching it.
Syntax
mount [-lhV]
mount -a [-fFnrsvw] [-t vfstype] [- O optlist]
mount [-fnrsvw] [-o option[,option]...] device|dir
mount [-fnrsvw] [-t vfstype] [-o options] device|dir
umount syntax
umount [-hV]
umount -a [-dflnrv] [-t vfstype] [-O options]
umount [-dflnrv] {dir|device}...
Description: mount
All files accessible in�Unix, or a Unix-style system such as�Linux, are arranged in
one big tree: the�file hierarchy, rooted at�/. These files can be spread out over
several�devices. The�mount�command attaches a filesystem, on some device or other,
to the file tree. Conversely, the�umount�command detaches it again.
The standard form of the�mount�command is:
mount -t type device dir
This tells the�kernel�to attach the filesystem found on�device�(which is of
type�type) at the directory�dir. The previous contents (if any),�owner,
and�mode�of�dir�become invisible, and as long as this filesystem remains mounted,
the�pathname�dir�refers to the root of the filesystem on device.
If only�directory�or�device�is given, for example:
mount /dir
then�mount�looks for a corresponding mountpoint (and then, if not found, for a
corresponding device) entry in the�/etc/fstab�file, and attempts to mount it.
Description: umount
The�umount�command detaches the specified file system(s) from the file hierarchy. A
file system is specified by giving the directory where it was mounted. Giving the
special device on which the file system lives may also work, but is an obsolete
method, mainly because it fails in case this device was mounted on more than one
directory.
Note that a file system cannot be unmounted when it is busy - for example, when
there are open files on it, or when some process has its working directory there,
or when a�swap file�on it's in use. The offending process could even
be�umount�itself - for example,�umount�opens the common�C�libraries, which in turn
may open (for example) locale files, which, if they are on the device in question,
prevents it from being unmounted. A "lazy"�unmount�(see�-l�in the�umount options
section, below) attempts to unmount even if this conflict arises.
Listing Mounts And Getting Help
Three forms of the�mount�command do not actually mount anything:
mount -h
prints a help message, and exits;
mount -V
prints�mount's version information, and exits;
mount [-l] [-t type]
lists all mounted filesystems (of type�type). The option�-l�adds labels to this
listing.