]> git.ipfire.org Git - thirdparty/util-linux.git/blob - sys-utils/umount.8
fix bold style of man page references
[thirdparty/util-linux.git] / sys-utils / umount.8
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.
5 .\"
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.
10 .\"
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.
15 .\"
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.
20 .\"
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.
24 .\"
25 .TH UMOUNT 8 "August 2012" "util-linux" "System Administration"
26 .SH NAME
27 umount \- unmount file systems
28 .SH SYNOPSIS
29 .B umount
30 .RB [ \-hV ]
31 .LP
32 .B umount \-a
33 .RB [ \-dflnrv ]
34 .RB [ \-t
35 .IR vfstype ]
36 .RB [ \-O
37 .IR options ]
38 .br
39 .B umount
40 .RB [ \-dflnrv ]
41 .RI { dir | device }...
42 .SH DESCRIPTION
43 The
44 .B umount
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.
50 .PP
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
55 .B umount
56 itself - it opens libc, and libc in its turn may open for example locale
57 files. A lazy unmount avoids this problem.
58 .SH OPTIONS
59 .TP
60 \fB\-a\fR, \fB\-\-all\fR
61 All of the file systems described in
62 .I /etc/mtab
63 are unmounted. (With
64 .B umount
65 version 2.7 and later: the
66 .I proc
67 filesystem is not unmounted.)
68 .TP
69 \fB\-c\fR, \fB\-\-no\-canonicalize\fR
70 Do not canonicalize paths. For more details about this option see the
71 .BR mount (8)
72 man page.
73 .TP
74 \fB\-d\fR, \fB\-\-detach\-loop\fR
75 In case the unmounted device was a loop device, also free this loop
76 device.
77 .TP
78 \fB\-\-fake\fP
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
81 .I /etc/mtab
82 that were unmounted earlier with the
83 .B \-n
84 option.
85 .TP
86 \fB\-f\fR, \fB\-\-force\fR
87 Force unmount (in case of an unreachable NFS system). (Requires kernel
88 2.1.116 or later.)
89 .TP
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.
93 .TP
94 \fB\-n\fR, \fB\-\-no\-mtab\fR
95 Unmount without writing in
96 .IR /etc/mtab .
97 .TP
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.)
102 .TP
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
105 specified options in
106 .IR /etc/fstab .
107 More than one option type may be specified in a comma separated list.
108 Each option can be prefixed with
109 .B no
110 to specify options for which no action should be taken.
111 .TP
112 \fB\-r\fR, \fB\-\-read\-only\fR
113 In case unmounting fails, try to remount read-only.
114 .TP
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
117 specified
118 .IR type .
119 More than one type may be specified in a comma separated list. The list
120 of file system types can be prefixed with
121 .B no
122 to specify the file system types on which no action should be taken.
123 .TP
124 \fB\-v\fR, \fB\-\-verbose\fR
125 Verbose mode.
126 .TP
127 \fB\-h\fR, \fB\-\-help\fR
128 Print help message and exit.
129 .TP
130 \fB\-V\fR, \fB\-\-version\fR
131 Print version and exit.
132 .SH "THE LOOP DEVICE"
133 The
134 .B umount
135 command will free the loop device (if any) associated with the mount, in
136 case it finds the option 'loop=...' in
137 .IR /etc/mtab ,
138 or when the \-d option was given. Any pending loop devices can be freed
139 using 'losetup -d', see
140 .BR losetup (8).
141 .SH NOTES
142 The syntax of external umount helpers is:
143 .PP
144 .BI /sbin/umount. <suffix>
145 .RI { dir | device }
146 .RB [ \-nlfvr ]
147 .RB [ \-t
148 .IR type.subtype ]
149 .PP
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).
153 .PP
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).
157 .PP
158 The helper= mount option redirects all umount requests to the
159 /sbin/umount.<helper> independently on UID.
160 .SH FILES
161 .I /etc/mtab
162 table of mounted file systems
163 .SH ENVIRONMENT
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
169 enables debug output
170 .SH "SEE ALSO"
171 .BR umount (2),
172 .BR mount (8),
173 .BR losetup (8)
174 .SH HISTORY
175 A
176 .B umount
177 command appeared in Version 6 AT&T UNIX.
178 .SH AVAILABILITY
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/
181 Linux Kernel Archive
182 .UE .