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