umount — unmount file systems
umount \-a [
−t fstype ] [
−O option... ]
−dflnrv] directory | device ...
The umount command detaches the mentioned file system(s) from the file hierarchy. A file system is specified by giving the directory where it has been mounted. Giving the special device on which the file system lives may also work, but is obsolete, mainly because it will fail 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 is in use. The offending process could even be umount itself - it opens libc, and libc in its turn may open for example locale files. A lazy unmount avoids this problem.
All of the filesystems described in
/etc/mtab are unmounted, except the
Unmount all mountpoints in the current namespace for
the specified filesystem. The filesystem can be
specified by one of the mountpoints or the device name
(or UUID, etc.). When this option is used together with
then all nested mounts within the filesystem are
recursively unmounted. This option is only supported on
systems where /etc/mtab is a symlink to
Do not canonicalize paths. For more details about
this option see the mount(8) man page.
Note that umount does not pass
this option to the
When the unmounted device was a loop device, also free this loop device.
Causes everything to be done except for the actual
system call or umount helper execution; this 'fakes'
unmounting the filesystem. It can be used to remove
that were unmounted earlier with the
Force an unmount (in case of an unreachable NFS system). (Requires kernel 2.1.116 or later.)
Note that this option does not guarantee that umount command does not hang. It's strongly recommended to use absolute paths without symlinks to avoid unwanted readlink and stat syscalls on unreachable NFS in umount.
Do not call the
even if it exists. By default such a helper program is
called if it exists.
Lazy unmount. Detach the filesystem from the file hierarchy now, and clean up all references to this filesystem as soon as it is not busy anymore. (Requires kernel 2.4.11 or later.)
Unmount without writing in
Unmount only the filesystems that have the specified
option set in
More than one option may be specified in a
comma-separated list. Each option can be prefixed with
no to indicate that no
action should be taken for this option.
Recursively unmount each specified directory. Recursion for each directory will stop if any unmount operation in the chain fails for any reason. The relationship between mountpoints is determined by /proc/self/mountinfo entries. The filesystem must be specified by mountpoint path; a recursive unmount by device name (or UUID) is unsupported.
When an unmount fails, try to remount the filesystem read-only.
Indicate that the actions should only be taken on
filesystems of the specified type. More than one
type may be specified in a comma-separated list. The
list of filesystem types can be prefixed with
no to indicate that no
action should be taken for all of the mentioned
Display version information and exit.
Display help text and exit.
command will free the loop device associated with a mount
when it finds the option
/etc/mtab, or when the
−d option was given. Any still
associated loop devices can be freed by using losetup -d; see losetup(8).
The syntax of external unmount helpers is:
is the filesystem type (or the value from a
helper= marker in the mtab
−t option can be
used for filesystems that have subtype support. For
umount.fuse −t fuse.sshfs
(unprivileged helper) can appear in the
/etc/mtab file when ordinary users need to
be able to unmount a mountpoint that is not defined in
/etc/fstab (for example for a
device that was mounted by udisks(1)).
helper=type marker in the mtab
file will redirect all unmount requests to the
/sbin/umount.type helper independently
overrides the default location of the fstab file (ignored for suid)
overrides the default location of the mtab file (ignored for suid)
enables libmount debug output
The umount command is part of the util-linux package and is available from Linux Kernel Archive
Copyright (c) 1996 Andries Brouwer
This page is somewhat derived from a page that was
(c) 1980, 1989, 1991 The Regents of the University of California
and had been heavily modified by Rik Faith and myself.
This is free documentation; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
The GNU General Public License's references to "object code"
and "executables" are to be interpreted as the output of any
document formatting or typesetting system, including
intermediate and printed output.
This manual is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.