xref: /openbsd-src/sbin/umount/umount.8 (revision 83348857057bb4d7e8af1e261e2c940878592523)
1.\"	$OpenBSD: umount.8,v 1.17 2019/09/06 19:25:08 schwarze Exp $
2.\"	$NetBSD: umount.8,v 1.2 1995/03/18 15:01:35 cgd Exp $
3.\"
4.\" Copyright (c) 1980, 1989, 1991, 1993
5.\"	The Regents of the University of California.  All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\" 3. Neither the name of the University nor the names of its contributors
16.\"    may be used to endorse or promote products derived from this software
17.\"    without specific prior written permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29.\" SUCH DAMAGE.
30.\"
31.\"     @(#)umount.8	8.1 (Berkeley) 2/20/94
32.\"
33.Dd $Mdocdate: September 6 2019 $
34.Dt UMOUNT 8
35.Os
36.Sh NAME
37.Nm umount
38.Nd unmount file systems
39.Sh SYNOPSIS
40.Nm umount
41.Op Fl fv
42.Ar special | node
43.Nm umount
44.Fl a
45.Op Fl fv
46.Op Fl h Ar host
47.Op Fl t Ar type
48.Sh DESCRIPTION
49The
50.Nm
51command
52calls the
53.Xr unmount 2
54system call to remove a
55.Ar special
56device or
57.Ar node
58.Pf ( Bo Ar rhost :
59.Bc Ar path )
60from the file system tree.
61Multiple devices and nodes may be specified on the command line.
62If neither
63.Ar special
64nor
65.Ar node
66are provided, the appropriate information is taken from the kernel.
67.Pp
68The options are as follows:
69.Bl -tag -width Ds
70.It Fl a
71All of the file systems except root returned by
72.Xr getmntinfo 3
73are unmounted.
74.It Fl f
75The file system is forcibly unmounted.
76Active special devices continue to work,
77but all other files return errors if further accesses are attempted.
78The root file system cannot be forcibly unmounted.
79.It Fl h Ar host
80Only filesystems mounted from the specified host will be
81unmounted.
82This option implies the
83.Fl a
84option and, unless otherwise specified with the
85.Fl t
86option, will only unmount NFS filesystems.
87.It Fl t Ar type
88Indicates that actions should only be taken on
89filesystems of the specified type.
90More than one type may be specified in a comma separated list.
91The list of filesystem types can be prefixed with
92.Dq no
93to specify the filesystem types for which action should
94.Em not
95be taken.
96For example, the following command
97unmounts all filesystems of type
98NFS and MFS:
99.Bd -literal -offset indent
100# umount -a -t nfs,mfs
101.Ed
102.It Fl v
103Verbose, additional information is printed out as each file system
104is unmounted.
105.El
106.Sh SEE ALSO
107.Xr unmount 2 ,
108.Xr getmntinfo 3 ,
109.Xr mount 8
110.Sh HISTORY
111A
112.Nm
113command appeared in
114.At v1 .
115