{
    "mode": "man",
    "parameter": "umount",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/umount/8/json",
    "generated": "2026-05-30T06:06:34Z",
    "synopsis": "umount -a [-dflnrv] [-t fstype] [-O option...]\numount [-dflnrv] {directory|device}\numount -h|-V",
    "sections": {
        "NAME": {
            "content": "umount - unmount filesystems\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "umount -a [-dflnrv] [-t fstype] [-O option...]\n\numount [-dflnrv] {directory|device}\n\numount -h|-V\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The umount command detaches the mentioned filesystem(s) from the file hierarchy. A filesystem\nis specified by giving the directory where it has been mounted. Giving the special device on\nwhich the filesystem lives may also work, but is obsolete, mainly because it will fail in\ncase this device was mounted on more than one directory.\n\nNote that a filesystem cannot be unmounted when it is 'busy' - for example, when there are\nopen files on it, or when some process has its working directory there, or when a swap file\non it is in use. The offending process could even be umount itself - it opens libc, and libc\nin its turn may open for example locale files. A lazy unmount avoids this problem, but it may\nintroduce other issues. See --lazy description below.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-a --all",
                    "content": "All of the filesystems described in /proc/self/mountinfo (or in deprecated /etc/mtab) are\nunmounted, except the proc, devfs, devpts, sysfs, rpcpipefs and nfsd filesystems. This\nlist of the filesystems may be replaced by --types umount option.\n",
                    "flag": "-a",
                    "long": "--all"
                },
                {
                    "name": "-A --all-targets",
                    "content": "Unmount all mountpoints in the current mount namespace for the specified filesystem. The\nfilesystem can be specified by one of the mountpoints or the device name (or UUID, etc.).\nWhen this option is used together with --recursive, then all nested mounts within the\nfilesystem are recursively unmounted. This option is only supported on systems where\n/etc/mtab is a symlink to /proc/mounts.\n",
                    "flag": "-A",
                    "long": "--all-targets"
                },
                {
                    "name": "-c --no-canonicalize",
                    "content": "Do not canonicalize paths. The paths canonicalization is based on stat(2) and readlink(2)\nsystem calls. These system calls may hang in some cases (for example on NFS if server is\nnot available). The option has to be used with canonical path to the mount point.\n\nThis option is silently ignored by umount for non-root users.\n\nFor more details about this option see the mount(8) man page. Note that umount does not\npass this option to the /sbin/umount.type helpers.\n",
                    "flag": "-c",
                    "long": "--no-canonicalize"
                },
                {
                    "name": "-d --detach-loop",
                    "content": "When the unmounted device was a loop device, also free this loop device. This option is\nunnecessary for devices initialized by mount(8), in this case \"autoclear\" functionality\nis enabled by default.\n",
                    "flag": "-d",
                    "long": "--detach-loop"
                },
                {
                    "name": "--fake",
                    "content": "Causes everything to be done except for the actual system call or umount helper\nexecution; this 'fakes' unmounting the filesystem. It can be used to remove entries from\nthe deprecated /etc/mtab that were unmounted earlier with the -n option.\n",
                    "long": "--fake"
                },
                {
                    "name": "-f --force",
                    "content": "Force an unmount (in case of an unreachable NFS system).\n\nNote that this option does not guarantee that umount command does not hang. It’s strongly\nrecommended to use absolute paths without symlinks to avoid unwanted readlink and stat\nsystem calls on unreachable NFS in umount.\n",
                    "flag": "-f",
                    "long": "--force"
                },
                {
                    "name": "-i --internal-only",
                    "content": "Do not call the /sbin/umount.filesystem helper even if it exists. By default such a\nhelper program is called if it exists.\n",
                    "flag": "-i",
                    "long": "--internal-only"
                },
                {
                    "name": "-l --lazy",
                    "content": "Lazy unmount. Detach the filesystem from the file hierarchy now, and clean up all\nreferences to this filesystem as soon as it is not busy anymore.\n\nA system reboot would be expected in near future if you’re going to use this option for\nnetwork filesystem or local filesystem with submounts. The recommended use-case for\numount -l is to prevent hangs on shutdown due to an unreachable network share where a\nnormal umount will hang due to a downed server or a network partition. Remounts of the\nshare will not be possible.\n",
                    "flag": "-l",
                    "long": "--lazy"
                },
                {
                    "name": "-N --namespace",
                    "content": "Perform umount in the mount namespace specified by ns. ns is either PID of process\nrunning in that namespace or special file representing that namespace.\n\numount switches to the namespace when it reads /etc/fstab, writes /etc/mtab (or writes to\n/run/mount) and calls umount(2) system call, otherwise it runs in the original namespace.\nIt means that the target mount namespace does not have to contain any libraries or other\nrequirements necessary to execute umount(2) command.\n\nSee mountnamespaces(7) for more information.\n",
                    "flag": "-N",
                    "long": "--namespace"
                },
                {
                    "name": "-n --no-mtab",
                    "content": "Unmount without writing in /etc/mtab.\n",
                    "flag": "-n",
                    "long": "--no-mtab"
                },
                {
                    "name": "-O --test-opts",
                    "content": "Unmount only the filesystems that have the specified option set in /etc/fstab. More than\none option may be specified in a comma-separated list. Each option can be prefixed with\nno to indicate that no action should be taken for this option.\n",
                    "flag": "-O",
                    "long": "--test-opts"
                },
                {
                    "name": "-q --quiet",
                    "content": "Suppress \"not mounted\" error messages.\n",
                    "flag": "-q",
                    "long": "--quiet"
                },
                {
                    "name": "-R --recursive",
                    "content": "Recursively unmount each specified directory. Recursion for each directory will stop if\nany unmount operation in the chain fails for any reason. The relationship between\nmountpoints is determined by /proc/self/mountinfo entries. The filesystem must be\nspecified by mountpoint path; a recursive unmount by device name (or UUID) is\nunsupported. Since version 2.37 it umounts also all over-mounted filesystems (more\nfilesystems on the same mountpoint).\n",
                    "flag": "-R",
                    "long": "--recursive"
                },
                {
                    "name": "-r --read-only",
                    "content": "When an unmount fails, try to remount the filesystem read-only.\n",
                    "flag": "-r",
                    "long": "--read-only"
                },
                {
                    "name": "-t --types",
                    "content": "Indicate that the actions should only be taken on filesystems of the specified type. More\nthan one type may be specified in a comma-separated list. The list of filesystem types\ncan be prefixed with no to indicate that no action should be taken for all of the\nmentioned types. Note that umount reads information about mounted filesystems from kernel\n(/proc/mounts) and filesystem names may be different than filesystem names used in the\n/etc/fstab (e.g., \"nfs4\" vs. \"nfs\").\n",
                    "flag": "-t",
                    "long": "--types"
                },
                {
                    "name": "-v --verbose",
                    "content": "Verbose mode.\n",
                    "flag": "-v",
                    "long": "--verbose"
                },
                {
                    "name": "-V --version",
                    "content": "Display version information and exit.\n",
                    "flag": "-V",
                    "long": "--version"
                },
                {
                    "name": "-h --help",
                    "content": "Display help text and exit.\n",
                    "flag": "-h",
                    "long": "--help"
                }
            ]
        },
        "NON-SUPERUSER UMOUNTS": {
            "content": "Normally, only the superuser can umount filesystems. However, when fstab contains the user\noption on a line, anybody can umount the corresponding filesystem. For more details see\nmount(8) man page.\n\nSince version 2.34 the umount command can be used to perform umount operation also for fuse\nfilesystems if kernel mount table contains user’s ID. In this case fstab user= mount option\nis not required.\n\nSince version 2.35 umount command does not exit when user permissions are inadequate by\ninternal libmount security rules. It drops suid permissions and continue as regular non-root\nuser. This can be used to support use-cases where root permissions are not necessary (e.g.,\nfuse filesystems, user namespaces, etc).\n",
            "subsections": []
        },
        "LOOP DEVICE": {
            "content": "The umount command will automatically detach loop device previously initialized by mount(8)\ncommand independently of /etc/mtab.\n\nIn this case the device is initialized with \"autoclear\" flag (see losetup(8) output for more\ndetails), otherwise it’s necessary to use the option --detach-loop or call losetup -d\n<device>. The autoclear feature is supported since Linux 2.6.25.\n",
            "subsections": []
        },
        "EXTERNAL HELPERS": {
            "content": "The syntax of external unmount helpers is:\n\numount.suffix {directory|device} [-flnrv] [-N namespace] [-t type.subtype]\n\nwhere suffix is the filesystem type (or the value from a uhelper= or helper= marker in the\nmtab file). The -t option can be used for filesystems that have subtype support. For example:\n\numount.fuse -t fuse.sshfs\n\nA uhelper=something marker (unprivileged helper) can appear in the /etc/mtab file when\nordinary users need to be able to unmount a mountpoint that is not defined in /etc/fstab (for\nexample for a device that was mounted by udisks(1)).\n\nA helper=type marker in the mtab file will redirect all unmount requests to the\n/sbin/umount.type helper independently of UID.\n\nNote that /etc/mtab is currently deprecated and helper= and other userspace mount options are\nmaintained by libmount.\n",
            "subsections": []
        },
        "ENVIRONMENT": {
            "content": "LIBMOUNTFSTAB=<path>\noverrides the default location of the fstab file (ignored for suid)\n\nLIBMOUNTMTAB=<path>\noverrides the default location of the mtab file (ignored for suid)\n\nLIBMOUNTDEBUG=all\nenables libmount debug output\n",
            "subsections": []
        },
        "FILES": {
            "content": "/etc/mtab\ntable of mounted filesystems (deprecated and usually replaced by symlink to /proc/mounts)\n\n/etc/fstab\ntable of known filesystems\n\n/proc/self/mountinfo\ntable of mounted filesystems generated by kernel.\n",
            "subsections": []
        },
        "HISTORY": {
            "content": "A umount command appeared in Version 6 AT&T UNIX.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "umount(2), losetup(8), mountnamespaces(7), mount(8)\n",
            "subsections": []
        },
        "REPORTING BUGS": {
            "content": "For bug reports, use the issue tracker at https://github.com/karelzak/util-linux/issues.\n",
            "subsections": []
        },
        "AVAILABILITY": {
            "content": "The umount command is part of the util-linux package which can be downloaded from Linux\nKernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.\n\n\n\nutil-linux 2.37.2                            2021-06-02                                    UMOUNT(8)",
            "subsections": []
        }
    },
    "summary": "umount - unmount filesystems",
    "flags": [
        {
            "flag": "-a",
            "long": "--all",
            "arg": null,
            "description": "All of the filesystems described in /proc/self/mountinfo (or in deprecated /etc/mtab) are unmounted, except the proc, devfs, devpts, sysfs, rpcpipefs and nfsd filesystems. This list of the filesystems may be replaced by --types umount option."
        },
        {
            "flag": "-A",
            "long": "--all-targets",
            "arg": null,
            "description": "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."
        },
        {
            "flag": "-c",
            "long": "--no-canonicalize",
            "arg": null,
            "description": "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."
        },
        {
            "flag": "-d",
            "long": "--detach-loop",
            "arg": null,
            "description": "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."
        },
        {
            "flag": "",
            "long": "--fake",
            "arg": null,
            "description": "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."
        },
        {
            "flag": "-f",
            "long": "--force",
            "arg": null,
            "description": "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 and stat system calls on unreachable NFS in umount."
        },
        {
            "flag": "-i",
            "long": "--internal-only",
            "arg": null,
            "description": "Do not call the /sbin/umount.filesystem helper even if it exists. By default such a helper program is called if it exists."
        },
        {
            "flag": "-l",
            "long": "--lazy",
            "arg": null,
            "description": "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 is to prevent hangs on shutdown due to an unreachable network share where a normal umount will hang due to a downed server or a network partition. Remounts of the share will not be possible."
        },
        {
            "flag": "-N",
            "long": "--namespace",
            "arg": null,
            "description": "Perform umount in the mount namespace specified by ns. ns is either PID of process running in that namespace or special file representing that namespace. umount switches to the namespace when it reads /etc/fstab, writes /etc/mtab (or writes to /run/mount) and calls umount(2) system call, otherwise it runs in the original namespace. It means that the target mount namespace does not have to contain any libraries or other requirements necessary to execute umount(2) command. See mountnamespaces(7) for more information."
        },
        {
            "flag": "-n",
            "long": "--no-mtab",
            "arg": null,
            "description": "Unmount without writing in /etc/mtab."
        },
        {
            "flag": "-O",
            "long": "--test-opts",
            "arg": null,
            "description": "Unmount only the filesystems that have the specified option set in /etc/fstab. 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."
        },
        {
            "flag": "-q",
            "long": "--quiet",
            "arg": null,
            "description": "Suppress \"not mounted\" error messages."
        },
        {
            "flag": "-R",
            "long": "--recursive",
            "arg": null,
            "description": "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. Since version 2.37 it umounts also all over-mounted filesystems (more filesystems on the same mountpoint)."
        },
        {
            "flag": "-r",
            "long": "--read-only",
            "arg": null,
            "description": "When an unmount fails, try to remount the filesystem read-only."
        },
        {
            "flag": "-t",
            "long": "--types",
            "arg": null,
            "description": "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 types. Note that umount reads information about mounted filesystems from kernel (/proc/mounts) and filesystem names may be different than filesystem names used in the /etc/fstab (e.g., \"nfs4\" vs. \"nfs\")."
        },
        {
            "flag": "-v",
            "long": "--verbose",
            "arg": null,
            "description": "Verbose mode."
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "Display version information and exit."
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "Display help text and exit."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "losetup",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/losetup/8/json"
        },
        {
            "name": "mountnamespaces",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/mountnamespaces/7/json"
        },
        {
            "name": "mount",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/mount/8/json"
        }
    ]
}