UMOUNT(8) System Administration UMOUNT(8)
NAME
umount - unmount filesystems
SYNOPSIS
umount -a [-dflnrv] [-t fstype] [-O option...]
umount [-dflnrv] {directory|device}
umount -h|-V
DESCRIPTION
The umount command detaches the mentioned filesystem(s) from the file
hierarchy. A filesystem is specified by giving the directory where it
has been mounted. Giving the special device on which the filesystem
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 filesystem 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, but it may introduce other issues. See --lazy description
below.
OPTIONS
-a, --all
All of the filesystems described in /proc/self/mountinfo (or in
deprecated /etc/mtab) are unmounted, except the proc, devfs, devpts,
sysfs, rpc_pipefs and nfsd filesystems. This list of the filesystems
may be replaced by --types umount option.
-A, --all-targets
Unmount all mountpoints in the current mount 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 --recursive, then all nested mounts within the
filesystem are recursively unmounted. This option is only supported
on systems where /etc/mtab is a symlink to /proc/mounts.
-c, --no-canonicalize
Do not canonicalize paths. The paths canonicalization is based on
stat(2) and readlink(2) system calls. These system calls may hang in
some cases (for example on NFS if server is not available). The
option has to be used with canonical path to the mount point.
This option is silently ignored by umount for non-root users.
For more details about this option see the mount(8) man page. Note
that umount does not pass this option to the /sbin/umount.type
helpers.
-d, --detach-loop
When the unmounted device was a loop device, also free this loop
device. This option is unnecessary for devices initialized by
mount(8), in this case "autoclear" functionality is enabled by
default.
--fake
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 entries from the deprecated /etc/mtab that
were unmounted earlier with the -n option.
-f, --force
Force an unmount (in case of an unreachable NFS system).
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(2) and stat(2) system calls on
unreachable NFS in umount.
-i, --internal-only
Do not call the /sbin/umount.filesystem helper even if it exists. By
default such a helper program is called if it exists.
-l, --lazy
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.
A system reboot would be expected in near future if you’re going to
use this option for network filesystem or local filesystem with
submounts. The recommended use-case for umount -l