1 .\" Copyright (c) 1996 Andries Brouwer
2 .\" This page is somewhat derived from a page that was
3 .\" (c) 1980, 1989, 1991 The Regents of the University of California
4 .\" and had been heavily modified by Rik Faith and myself.
6 .\" This is free documentation; you can redistribute it and/or
7 .\" modify it under the terms of the GNU General Public License as
8 .\" published by the Free Software Foundation; either version 2 of
9 .\" the License, or (at your option) any later version.
11 .\" The GNU General Public License's references to "object code"
12 .\" and "executables" are to be interpreted as the output of any
13 .\" document formatting or typesetting system, including
14 .\" intermediate and printed output.
16 .\" This manual is distributed in the hope that it will be useful,
17 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
18 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 .\" GNU General Public License for more details.
21 .\" You should have received a copy of the GNU General Public License along
22 .\" with this program; if not, write to the Free Software Foundation, Inc.,
23 .\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 .TH UMOUNT 8 "August 2012" "util-linux" "System Administration"
27 umount \- unmount file systems
41 .RI { dir | device }...
45 command detaches the file system(s) mentioned from the file hierarchy. A
46 file system is specified by giving the directory where it has been
47 mounted. Giving the special device on which the file system lives may
48 also work, but is obsolete, mainly because it will fail in case this
49 device was mounted on more than one directory.
51 Note that a file system cannot be unmounted when it is 'busy' - for
52 example, when there are open files on it, or when some process has its
53 working directory there, or when a swap file on it is in use. The
54 offending process could even be
56 itself - it opens libc, and libc in its turn may open for example locale
57 files. A lazy unmount avoids this problem.
60 \fB\-a\fR, \fB\-\-all\fR
61 All of the file systems described in
65 version 2.7 and later: the
67 filesystem is not unmounted.)
69 \fB\-A\fR, \fB\-\-all-targets\fR
70 Unmount all mountpoints in the current namespace for the specified filesystem.
71 The filesystem could be specified by one of the mountpoints or device name (or
72 UUID, etc.). This option could be used together with \fB\-\-recursive\fR then
73 all nested mounts within the filesystem are recursively unmounted. The
74 \fB\-\-all-targets\fR is only supported on systems where /etc/mtab is a symlink
77 \fB\-c\fR, \fB\-\-no\-canonicalize\fR
78 Do not canonicalize paths. For more details about this option see the
80 man page. Note that umount(8) does not pass this option to /sbin/umount.<type> helpers.
82 \fB\-d\fR, \fB\-\-detach\-loop\fR
83 In case the unmounted device was a loop device, also free this loop
87 Causes everything to be done except for the actual system call; this 'fakes'
88 unmounting the filesystem. It can be used to remove entries from
90 that were unmounted earlier with the
94 \fB\-f\fR, \fB\-\-force\fR
95 Force unmount (in case of an unreachable NFS system). (Requires kernel
98 \fB\-i\fR, \fB\-\-internal\-only\fR
99 Do not call the /sbin/umount.<filesystem> helper even if it exists. By
100 default /sbin/umount.<filesystem> helper is called if one exists.
102 \fB\-n\fR, \fB\-\-no\-mtab\fR
103 Unmount without writing in
106 \fB\-l\fR, \fB\-\-lazy\fR
107 Lazy unmount. Detach the filesystem from the filesystem hierarchy now,
108 and cleanup all references to the filesystem as soon as it is not busy
109 anymore. (Requires kernel 2.4.11 or later.)
111 \fB\-O\fR, \fB\-\-test\-opts\fR \fIoptions,list\fR
112 Indicate that the actions should only be taken on file systems with the
115 More than one option type may be specified in a comma separated list.
116 Each option can be prefixed with
118 to specify options for which no action should be taken.
120 \fB\-R\fR, \fB\-\-recursive\fR
121 Recursively unmount each directory specified. Recursion for each directory will
122 stop if any unmount operation in the chain fails for any reason. The relationship
123 between mountpoints is determined by /proc/self/mountinfo entries. The filesystem
124 must be specified by mountpoint path, recursive unmount by device name (or UUID)
127 \fB\-r\fR, \fB\-\-read\-only\fR
128 In case unmounting fails, try to remount read-only.
130 \fB\-t\fR, \fB\-\-types\fR \fIvfstype,ext2,ext3\fR
131 Indicate that the actions should only be taken on file systems of the
134 More than one type may be specified in a comma separated list. The list
135 of file system types can be prefixed with
137 to specify the file system types on which no action should be taken.
139 \fB\-v\fR, \fB\-\-verbose\fR
142 \fB\-h\fR, \fB\-\-help\fR
143 Display help text and exit.
145 \fB\-V\fR, \fB\-\-version\fR
146 Display version information and exit.
147 .SH "THE LOOP DEVICE"
150 command will free the loop device (if any) associated with the mount, in
151 case it finds the option 'loop=...' in
153 or when the \-d option was given. Any pending loop devices can be freed
154 using 'losetup -d', see
156 .SH "EXTERNAL HELPERS"
157 The syntax of external umount helpers is:
159 .BI /sbin/umount. <suffix>
165 where the <suffix> is filesystem type or a value from "uhelper=" or
166 "helper=" mtab option. The \-t option is used for filesystems with
167 subtypes support (for example /sbin/mount.fuse -t fuse.sshfs).
169 The uhelper= (unprivileged umount helper) is possible to use when
170 non-root user wants to umount a mountpoint which is not defined in the
171 /etc/fstab file (e.g. devices mounted by udisk).
173 The helper= mount option redirects all umount requests to the
174 /sbin/umount.<helper> independently on UID.
177 table of mounted file systems
179 .IP LIBMOUNT_FSTAB=<path>
180 overrides the default location of the fstab file
181 .IP LIBMOUNT_MTAB=<path>
182 overrides the default location of the mtab file
183 .IP LIBMOUNT_DEBUG=0xffff
192 command appeared in Version 6 AT&T UNIX.
194 The umount command is part of the util-linux package and is available from
195 .UR ftp://\:ftp.kernel.org\:/pub\:/linux\:/utils\:/util-linux/