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\-c\fR, \fB\-\-no\-canonicalize\fR
70 Do not canonicalize paths. For more details about this option see the
74 \fB\-d\fR, \fB\-\-detach\-loop\fR
75 In case the unmounted device was a loop device, also free this loop
79 Causes everything to be done except for the actual system call; this 'fakes'
80 unmounting the filesystem. It can be used to remove entries from
82 that were unmounted earlier with the
86 \fB\-f\fR, \fB\-\-force\fR
87 Force unmount (in case of an unreachable NFS system). (Requires kernel
90 \fB\-i\fR, \fB\-\-internal\-only\fR
91 Do not call the /sbin/umount.<filesystem> helper even if it exists. By
92 default /sbin/umount.<filesystem> helper is called if one exists.
94 \fB\-n\fR, \fB\-\-no\-mtab\fR
95 Unmount without writing in
98 \fB\-l\fR, \fB\-\-lazy\fR
99 Lazy unmount. Detach the filesystem from the filesystem hierarchy now,
100 and cleanup all references to the filesystem as soon as it is not busy
101 anymore. (Requires kernel 2.4.11 or later.)
103 \fB\-O\fR, \fB\-\-test\-opts\fR \fIoptions,list\fR
104 Indicate that the actions should only be taken on file systems with the
107 More than one option type may be specified in a comma separated list.
108 Each option can be prefixed with
110 to specify options for which no action should be taken.
112 \fB\-r\fR, \fB\-\-read\-only\fR
113 In case unmounting fails, try to remount read-only.
115 \fB\-t\fR, \fB\-\-types\fR \fIvfstype,ext2,ext3\fR
116 Indicate that the actions should only be taken on file systems of the
119 More than one type may be specified in a comma separated list. The list
120 of file system types can be prefixed with
122 to specify the file system types on which no action should be taken.
124 \fB\-v\fR, \fB\-\-verbose\fR
127 \fB\-h\fR, \fB\-\-help\fR
128 Print help message and exit.
130 \fB\-V\fR, \fB\-\-version\fR
131 Print version and exit.
132 .SH "THE LOOP DEVICE"
135 command will free the loop device (if any) associated with the mount, in
136 case it finds the option 'loop=...' in
138 or when the \-d option was given. Any pending loop devices can be freed
139 using 'losetup -d', see
142 The syntax of external umount helpers is:
144 .BI /sbin/umount. <suffix>
150 where the <suffix> is filesystem type or a value from "uhelper=" or
151 "helper=" mtab option. The \-t option is used for filesystems with
152 subtypes support (for example /sbin/mount.fuse -t fuse.sshfs).
154 The uhelper= (unprivileged umount helper) is possible to use when
155 non-root user wants to umount a mountpoint which is not defined in the
156 /etc/fstab file (e.g. devices mounted by udisk).
158 The helper= mount option redirects all umount requests to the
159 /sbin/umount.<helper> independently on UID.
162 table of mounted file systems
164 .IP LIBMOUNT_FSTAB=<path>
165 overrides the default location of the fstab file
166 .IP LIBMOUNT_MTAB=<path>
167 overrides the default location of the mtab file
168 .IP LIBMOUNT_DEBUG=0xffff
177 command appeared in Version 6 AT&T UNIX.
179 The umount command is part of the util-linux package and is available from
180 .UR ftp://\:ftp.kernel.org\:/pub\:/linux\:/utils\:/util-linux/