xref: /netbsd/sbin/umount/umount.8 (revision bf9ec67e)
1.\"	$NetBSD: umount.8,v 1.9 2001/06/05 11:22:54 wiz Exp $
2.\"
3.\" Copyright (c) 1980, 1989, 1991, 1993
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgement:
16.\"	This product includes software developed by the University of
17.\"	California, Berkeley and its contributors.
18.\" 4. Neither the name of the University nor the names of its contributors
19.\"    may be used to endorse or promote products derived from this software
20.\"    without specific prior written permission.
21.\"
22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32.\" SUCH DAMAGE.
33.\"
34.\"     @(#)umount.8	8.2 (Berkeley) 5/8/95
35.\"
36.Dd May 8, 1995
37.Dt UMOUNT 8
38.Os
39.Sh NAME
40.Nm umount
41.Nd unmount filesystems
42.Sh SYNOPSIS
43.Nm
44.Op Fl fvFR
45.Ar special | node
46.Nm ""
47.Fl a | A
48.Op Fl fvFR
49.Op Fl h Ar host
50.Op Fl t Ar type
51.Sh DESCRIPTION
52The
53.Nm
54command
55calls the
56.Xr unmount 2
57system call to remove a
58.Ar "special device"
59or the remote node (rhost:path) from the filesystem tree at the point
60.Ar node .
61If either
62.Ar special
63or
64.Ar node
65are not provided, the appropriate information is taken from the
66.Xr fstab 5
67file.
68.Pp
69The options are as follows:
70.Bl -tag -width indent
71.It Fl a
72All the currently mounted filesystems except the root are unmounted.
73.It Fl A
74Synonym for
75.Fl a .
76.It Fl f
77The filesystem is forcibly unmounted.
78Active special devices continue to work,
79but all other files return errors if further accesses are attempted.
80The root filesystem cannot be forcibly unmounted.
81.It Fl F
82Fake the unmount; perform all other processing but do not actually
83attempt the unmount.
84(This is most useful in conjunction with
85.Fl v ,
86to see what
87.Nm
88would attempt to do).
89.It Fl R
90Take the
91.Ar special | node
92argument as a path to be passed directly to
93.Xr unmount 2 ,
94bypassing all attempts to be smart about mechanically determining the
95correct path from the argument.
96This option is incompatible with any option that potentially umounts
97more than one filesystem, such as
98.Fl a ,
99but it can be used with
100.Fl f
101and/or
102.Fl v .
103This is the only way to unmount something that does not appear as a
104directory (such as a nullfs mount of a plain file); there are probably
105other cases where it is necessary.
106.It Fl h Ar host
107Only filesystems mounted from the specified host will be
108unmounted.
109This option is implies the
110.Fl A
111option and, unless otherwise specified with the
112.Fl t
113option, will only unmount NFS filesystems.
114.It Fl t Ar type
115Is used to indicate the actions should only be taken on
116filesystems of the specified type.
117More than one type may be specified in a comma separated list.
118The list of filesystem types can be prefixed with
119.Dq no
120to specify the filesystem types for which action should
121.Em not
122be taken.
123For example, the
124.Nm
125command:
126.Bd -literal -offset indent
127umount -a -t nfs,mfs
128.Ed
129.Pp
130umounts all filesystems of the type
131.Tn NFS
132and
133.Tn MFS .
134.It Fl v
135Verbose, additional information is printed out as each filesystem
136is unmounted.
137.El
138.Sh FILES
139.Bl -tag -width /etc/fstab -compact
140.It Pa /etc/fstab
141filesystem table
142.El
143.Sh SEE ALSO
144.Xr unmount 2 ,
145.Xr fstab 5 ,
146.Xr mount 8
147.Sh HISTORY
148A
149.Nm
150command appeared in
151.At v6 .
152