Upload Tizen:Base source
[framework/base/util-linux-ng.git] / mount / 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
22 .\" License along with this manual; if not, write to the Free
23 .\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
24 .\" USA.
25 .\"
26 .TH UMOUNT 8 "26 July 1997" "Linux 2.0" "Linux Programmer's Manual"
27 .SH NAME
28 umount \- unmount file systems
29 .SH SYNOPSIS
30 .B umount
31 .RB [ \-hV ]
32 .LP
33 .B umount \-a
34 .RB [ \-dflnrv ]
35 .RB [ \-t
36 .IR vfstype ]
37 .RB [ \-O
38 .IR options ]
39 .br
40 .B umount
41 .RB [ \-dflnrv ]
42 .RI { dir | device }...
43 .SH DESCRIPTION
44 The
45 .B umount
46 command detaches the file system(s) mentioned from the file hierarchy.
47 A file system is specified by giving the directory where it
48 has been mounted. Giving the special device on which the file system lives
49 may also work, but is obsolete, mainly because it will fail
50 in case this device was mounted on more than one directory.
51
52 Note that a file system cannot be unmounted when it is `busy' -
53 for example, when there are open files on it, or when some process
54 has its working directory there, or when a swap file on it is in use.
55 The offending process could even be
56 .B umount
57 itself - it opens libc, and libc in its turn may open for example
58 locale files.
59 A lazy unmount avoids this problem.
60
61 Options for the
62 .B umount
63 command:
64 .TP
65 .B \-V
66 Print version and exit.
67 .TP
68 .B \-h
69 Print help message and exit.
70 .TP
71 .B \-v
72 Verbose mode.
73 .TP
74 .B \-n
75 Unmount without writing in
76 .IR /etc/mtab .
77 .TP
78 .B \-r
79 In case unmounting fails, try to remount read-only.
80 .TP
81 .B \-d
82 In case the unmounted device was a loop device, also
83 free this loop device.
84 .TP
85 .B \-i
86 Don't call the /sbin/umount.<filesystem> helper even if it exists. By default /sbin/umount.<filesystem> helper is called if one exists.
87 .TP
88 .B \-a
89 All of the file systems described in
90 .I /etc/mtab
91 are unmounted. (With
92 .B umount
93 version 2.7 and later: the
94 .I proc
95 filesystem is not unmounted.)
96 .TP
97 .BI \-t " vfstype"
98 Indicate that the actions should only be taken on file systems of the
99 specified type.  More than one type may be specified in a comma separated
100 list.  The list of file system types can be prefixed with
101 .B no
102 to specify the file system types on which no action should be taken.
103 .TP
104 .BI \-O " options"
105 Indicate that the actions should only be taken on file systems with
106 the specified options in
107 .IR /etc/fstab .
108 More than one option type may be specified in a comma separated
109 list.  Each option can be prefixed with
110 .B no
111 to specify options for which no action should be taken.
112 .TP
113 .B \-f
114 Force unmount (in case of an unreachable NFS system).
115 (Requires kernel 2.1.116 or later.)
116 .TP
117 .B \-l
118 Lazy unmount. Detach the filesystem from the filesystem hierarchy now,
119 and cleanup all references to the filesystem as soon as it is not busy
120 anymore.
121 (Requires kernel 2.4.11 or later.)
122
123 .SH "THE LOOP DEVICE"
124 The
125 .B umount
126 command will free the loop device (if any) associated
127 with the mount, in case it finds the option `loop=...' in
128 .IR /etc/mtab ,
129 or when the \-d option was given.
130 Any pending loop devices can be freed using `losetup -d', see
131 .BR losetup (8).
132
133 .SH NOTES
134 The syntax of external umount helpers is:
135
136 .br
137 .BI /sbin/umount. <suffix>
138 .RI { dir | device }
139 .RB [ \-nlfvr ]
140 .br
141
142 where the <suffix> is filesystem type or a value from "uhelper=" mtab option.
143
144 The uhelper (unprivileged umount helper) is possible to used when non-root user
145 wants to umount a mountpoint which is not defined in the /etc/fstab file (e.g
146 devices mounted by HAL).
147
148 .SH FILES
149 .I /etc/mtab
150 table of mounted file systems
151
152 .SH "SEE ALSO"
153 .BR umount (2),
154 .BR mount (8),
155 .BR losetup (8).
156
157 .SH HISTORY
158 A
159 .B umount
160 command appeared in Version 6 AT&T UNIX.
161 .SH AVAILABILITY
162 The umount command is part of the util-linux-ng package and is available from
163 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.