umount
unmount file systems
- Provided by: mount (Version: 2.20.1-5.1ubuntu20.9)
- Source: util-linux
- Report a bug
unmount file systems
umount [-hV]
umount -a [-dflnrv] [-t vfstype]
[-O options]
umount [-dflnrv] {dir|device}...
The umount command detaches the file system(s) mentioned 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.
Options for the umount command:
The umount command will free the loop device (if any) associated with the mount, in case it finds the option `loop=...' in /etc/mtab, or when the -d option was given. Any pending loop devices can be freed using `losetup -d', see losetup(8).
The syntax of external umount helpers is:
/sbin/umount.<suffix> {dir|device} [-nlfvr] [-t type.subtype]
where the <suffix> is filesystem type or a value from "uhelper=" or "helper=" mtab option. The -t option is used for filesystems with subtypes support (for example /sbin/mount.fuse -t fuse.sshfs).
The uhelper= (unprivileged umount helper) is possible to use when non-root user wants to umount a mountpoint which is not defined in the /etc/fstab file (e.g devices mounted by udisk).
The helper= mount option redirects all umount requests to the /sbin/umount.<helper> independently on UID.
/etc/mtab table of mounted file systems
A umount command appeared in Version 6 AT&T UNIX.
The umount command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.