2012-08-04 02:33:38 -05:00
|
|
|
.\" Copyright (c) 1996 Andries Brouwer
|
|
|
|
.\" This page is somewhat derived from a page that was
|
|
|
|
.\" (c) 1980, 1989, 1991 The Regents of the University of California
|
|
|
|
.\" and had been heavily modified by Rik Faith and myself.
|
|
|
|
.\"
|
|
|
|
.\" This is free documentation; you can redistribute it and/or
|
|
|
|
.\" modify it under the terms of the GNU General Public License as
|
|
|
|
.\" published by the Free Software Foundation; either version 2 of
|
|
|
|
.\" the License, or (at your option) any later version.
|
|
|
|
.\"
|
|
|
|
.\" The GNU General Public License's references to "object code"
|
|
|
|
.\" and "executables" are to be interpreted as the output of any
|
|
|
|
.\" document formatting or typesetting system, including
|
|
|
|
.\" intermediate and printed output.
|
|
|
|
.\"
|
|
|
|
.\" This manual is distributed in the hope that it will be useful,
|
|
|
|
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
.\" GNU General Public License for more details.
|
|
|
|
.\"
|
|
|
|
.\" You should have received a copy of the GNU General Public License along
|
|
|
|
.\" with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
.\"
|
2014-07-21 16:56:02 -05:00
|
|
|
.TH UMOUNT 8 "July 2014" "util-linux" "System Administration"
|
2012-08-04 02:33:38 -05:00
|
|
|
.SH NAME
|
2020-05-28 09:58:23 -05:00
|
|
|
umount \- unmount filesystems
|
2012-08-04 02:33:38 -05:00
|
|
|
.SH SYNOPSIS
|
|
|
|
.B umount \-a
|
|
|
|
.RB [ \-dflnrv ]
|
|
|
|
.RB [ \-t
|
2014-06-29 10:49:43 -05:00
|
|
|
.IR fstype ]
|
2012-08-04 02:33:38 -05:00
|
|
|
.RB [ \-O
|
2014-07-21 16:56:02 -05:00
|
|
|
.IR option ...]
|
|
|
|
.sp
|
2012-08-04 02:33:38 -05:00
|
|
|
.B umount
|
|
|
|
.RB [ \-dflnrv ]
|
2014-07-21 16:56:02 -05:00
|
|
|
.RI { directory | device }...
|
|
|
|
.sp
|
|
|
|
.B umount
|
|
|
|
.BR \-h | \-V
|
|
|
|
|
2012-08-04 02:33:38 -05:00
|
|
|
.SH DESCRIPTION
|
|
|
|
The
|
|
|
|
.B umount
|
2020-05-28 09:58:23 -05:00
|
|
|
command detaches the mentioned filesystem(s) from the file hierarchy. A
|
|
|
|
filesystem is specified by giving the directory where it has been
|
|
|
|
mounted. Giving the special device on which the filesystem lives may
|
2012-08-04 02:33:38 -05:00
|
|
|
also work, but is obsolete, mainly because it will fail in case this
|
|
|
|
device was mounted on more than one directory.
|
|
|
|
.PP
|
2020-05-28 09:58:23 -05:00
|
|
|
Note that a filesystem cannot be unmounted when it is 'busy' - for
|
2012-08-04 02:33:38 -05:00
|
|
|
example, when there are open files on it, or when some process has its
|
|
|
|
working directory there, or when a swap file on it is in use. The
|
|
|
|
offending process could even be
|
|
|
|
.B umount
|
|
|
|
itself - it opens libc, and libc in its turn may open for example locale
|
2020-05-29 07:20:47 -05:00
|
|
|
files. A lazy unmount avoids this problem, but it may introduce other
|
2018-08-16 04:08:42 -05:00
|
|
|
issues. See \fB\-\-lazy\fR description below.
|
2012-08-04 02:33:38 -05:00
|
|
|
.SH OPTIONS
|
|
|
|
.TP
|
2014-07-21 16:56:02 -05:00
|
|
|
.BR \-a , " \-\-all"
|
2014-06-29 10:49:43 -05:00
|
|
|
All of the filesystems described in
|
2016-08-30 03:41:05 -05:00
|
|
|
.I /proc/self/mountinfo
|
2020-05-28 09:58:19 -05:00
|
|
|
(or in deprecated
|
|
|
|
.IR /etc/mtab )
|
2016-08-30 03:41:05 -05:00
|
|
|
are unmounted, except the proc, devfs, devpts, sysfs, rpc_pipefs and nfsd
|
|
|
|
filesystems. This list of the filesystems may be replaced by \fB\-\-types\fR
|
|
|
|
umount option.
|
2012-08-04 02:33:38 -05:00
|
|
|
.TP
|
2015-01-19 19:11:52 -06:00
|
|
|
.BR \-A , " \-\-all\-targets"
|
2020-05-28 09:58:18 -05:00
|
|
|
Unmount all mountpoints in the current mount namespace
|
|
|
|
for the specified filesystem.
|
2014-07-21 16:56:02 -05:00
|
|
|
The filesystem can be specified by one of the mountpoints or the device name (or
|
|
|
|
UUID, etc.). When this option is used together with \fB\-\-recursive\fR, then
|
|
|
|
all nested mounts within the filesystem are recursively unmounted.
|
2020-05-28 09:58:19 -05:00
|
|
|
This option is only supported on systems where
|
|
|
|
.I /etc/mtab
|
|
|
|
is a symlink
|
|
|
|
to
|
|
|
|
.IR /proc/mounts .
|
2013-02-26 07:50:26 -06:00
|
|
|
.TP
|
2015-01-19 19:11:52 -06:00
|
|
|
.BR \-c , " \-\-no\-canonicalize"
|
2017-06-06 05:05:14 -05:00
|
|
|
Do not canonicalize paths. The paths canonicalization is based on
|
|
|
|
.BR stat (2)
|
|
|
|
and
|
|
|
|
.BR readlink (2)
|
|
|
|
system calls. These system calls may hang in some cases (for example on NFS if
|
|
|
|
server is not available). The option has to be used with canonical path to the
|
|
|
|
mount point.
|
|
|
|
|
2020-11-19 04:12:06 -06:00
|
|
|
This option is silently ignored by
|
|
|
|
.B umount
|
|
|
|
for non-root users.
|
|
|
|
|
2017-06-06 05:05:14 -05:00
|
|
|
For more details about this option see the
|
2012-10-04 20:34:34 -05:00
|
|
|
.BR mount (8)
|
2017-06-06 05:05:14 -05:00
|
|
|
man page. Note that \fBumount\fR does not pass this option to the
|
2014-07-21 16:56:02 -05:00
|
|
|
.BI /sbin/umount. type
|
|
|
|
helpers.
|
2012-08-04 02:33:38 -05:00
|
|
|
.TP
|
2015-01-19 19:11:52 -06:00
|
|
|
.BR \-d , " \-\-detach\-loop"
|
2014-07-21 16:56:02 -05:00
|
|
|
When the unmounted device was a loop device, also free this loop
|
2016-08-30 03:25:44 -05:00
|
|
|
device. This option is unnecessary for devices initialized by
|
|
|
|
.BR mount (8),
|
|
|
|
in this case "autoclear" functionality is enabled by default.
|
2012-08-04 02:33:38 -05:00
|
|
|
.TP
|
2014-07-21 16:56:02 -05:00
|
|
|
.B \-\-fake
|
2015-06-03 03:59:35 -05:00
|
|
|
Causes everything to be done except for the actual system call or umount helper
|
|
|
|
execution; this 'fakes' unmounting the filesystem. It can be used to remove
|
2016-08-30 03:41:05 -05:00
|
|
|
entries from the deprecated
|
2012-08-04 02:33:38 -05:00
|
|
|
.I /etc/mtab
|
|
|
|
that were unmounted earlier with the
|
|
|
|
.B \-n
|
|
|
|
option.
|
|
|
|
.TP
|
2014-07-21 16:56:02 -05:00
|
|
|
.BR \-f , " \-\-force"
|
2017-06-28 21:09:06 -05:00
|
|
|
Force an unmount (in case of an unreachable NFS system).
|
2016-03-17 06:19:31 -05:00
|
|
|
|
|
|
|
Note that this option does not guarantee that umount command does not hang.
|
|
|
|
It's strongly recommended to use absolute paths without symlinks to avoid
|
2016-12-04 10:44:55 -06:00
|
|
|
unwanted readlink and stat system calls on unreachable NFS in umount.
|
2012-08-04 02:33:38 -05:00
|
|
|
.TP
|
2015-01-19 19:11:52 -06:00
|
|
|
.BR \-i , " \-\-internal\-only"
|
2014-07-21 16:56:02 -05:00
|
|
|
Do not call the \fB/sbin/umount.\fIfilesystem\fR helper even if it exists.
|
|
|
|
By default such a helper program is called if it exists.
|
2012-08-04 02:33:38 -05:00
|
|
|
.TP
|
2014-07-21 16:56:02 -05:00
|
|
|
.BR \-l , " \-\-lazy"
|
|
|
|
Lazy unmount. Detach the filesystem from the file hierarchy now,
|
|
|
|
and clean up all references to this filesystem as soon as it is not busy
|
2017-06-28 21:09:06 -05:00
|
|
|
anymore.
|
2018-04-20 02:50:04 -05:00
|
|
|
|
|
|
|
A system reboot would be expected in near future if you're going to use this
|
|
|
|
option for network filesystem or local filesystem with submounts. The
|
2019-12-15 18:51:57 -06:00
|
|
|
recommended use-case for \fBumount \-l\fR is to prevent hangs on shutdown due to
|
2018-04-20 02:50:04 -05:00
|
|
|
an unreachable network share where a normal umount will hang due to a downed
|
|
|
|
server or a network partition. Remounts of the share will not be possible.
|
|
|
|
|
2018-04-17 08:52:54 -05:00
|
|
|
.TP
|
|
|
|
.BR \-N , " \-\-namespace " \fIns
|
2020-05-28 09:58:18 -05:00
|
|
|
Perform umount in the mount namespace specified by \fIns\fR.
|
2018-04-20 10:57:39 -05:00
|
|
|
\fIns\fR is either PID of process running in that namespace
|
|
|
|
or special file representing that namespace.
|
2018-07-19 04:41:31 -05:00
|
|
|
.sp
|
|
|
|
.BR umount (8)
|
2020-05-28 09:58:19 -05:00
|
|
|
switches to the namespace when it reads
|
|
|
|
.IR /etc/fstab ,
|
|
|
|
writes
|
doc: Fix some warnings from "test-groff" for manuals
Source is current git content.
Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z
[ "test-groff" is a developmental version of "groff" ]
Input file is ././disk-utils/sfdisk.8
troff: backtrace: file '<./disk-utils/sfdisk.8>':67
troff: <./disk-utils/sfdisk.8>:67: warning: trailing space
Input file is ././misc-utils/kill.1
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-ext.tmac':133: macro 'EE'
troff: backtrace: file '<./misc-utils/kill.1>':167
troff: <./misc-utils/kill.1>:167: warning: macro 'mF' not defined
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-ext.tmac':134: macro 'EE'
troff: backtrace: file '<./misc-utils/kill.1>':167
troff: <./misc-utils/kill.1>:167: warning: number register 'mE' not defined
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-ext.tmac':134: macro 'EE'
troff: backtrace: file '<./misc-utils/kill.1>':167
troff: <./misc-utils/kill.1>:167: warning: bad font number
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-ext.tmac':135: macro 'EE'
troff: backtrace: file '<./misc-utils/kill.1>':167
troff: <./misc-utils/kill.1>:167: warning: number register 'sP' not defined
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-ext.tmac':134: macro 'EE'
troff: backtrace: file '<./misc-utils/kill.1>':170
troff: <./misc-utils/kill.1>:170: warning: bad font number
Input file is ././sys-utils/ipcs.1
<./sys-utils/ipcs.1>:103 (macro BR): only 1 argument, but more are expected
Input file is ././sys-utils/mount.8
<./sys-utils/mount.8>:68 (macro RB): only 1 argument, but more are expected
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-old.tmac':467: macro 'RB'
troff: backtrace: file '<./sys-utils/mount.8>':68
troff: <./sys-utils/mount.8>:68: warning [p 1, 3.5i]: can't break line
an-old.tmac: <./sys-utils/mount.8>:201 (.RE): warning: extra .RE or .RS is missing before it; "an-RS-open" is 0.
<./sys-utils/mount.8>:453 (macro BR): only 1 argument, but more are expected
<./sys-utils/mount.8>:500 (macro BR): only 1 argument, but more are expected
<./sys-utils/mount.8>:1050 (macro BR): only 1 argument, but more are expected
Input file is ././sys-utils/setpriv.1
<./sys-utils/setpriv.1>:17 (macro BR): only 1 argument, but more are expected
<./sys-utils/setpriv.1>:154 (macro BR): only 1 argument, but more are expected
<./sys-utils/setpriv.1>:166 (macro BR): only 1 argument, but more are expected
Input file is ././sys-utils/umount.8
<./sys-utils/umount.8>:145 (macro IR): only 1 argument, but more are expected
Input file is ././sys-utils/unshare.1
<./sys-utils/unshare.1>:266 (macro BR): only 1 argument, but more are expected
[kzak@redhat.com: - add .RS to fix extra .RE in mount.8]
Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-09 21:17:50 -05:00
|
|
|
.I /etc/mtab
|
2020-05-28 09:58:19 -05:00
|
|
|
(or writes to
|
|
|
|
.IR /run/mount )
|
|
|
|
and calls
|
2018-08-05 17:05:48 -05:00
|
|
|
.BR umount (2)
|
2020-05-28 09:58:18 -05:00
|
|
|
system call, otherwise it runs in the original namespace.
|
|
|
|
It means that the target mount namespace does not have
|
2020-05-29 07:20:47 -05:00
|
|
|
to contain any libraries or other requirements necessary to execute
|
2018-08-05 17:05:48 -05:00
|
|
|
.BR umount (2)
|
2018-07-19 04:41:31 -05:00
|
|
|
command.
|
|
|
|
.sp
|
2020-05-28 09:58:18 -05:00
|
|
|
See \fBmount_namespaces\fR(7) for more information.
|
2014-07-21 16:56:02 -05:00
|
|
|
.TP
|
2015-01-19 19:11:52 -06:00
|
|
|
.BR \-n , " \-\-no\-mtab"
|
2012-08-04 02:33:38 -05:00
|
|
|
Unmount without writing in
|
|
|
|
.IR /etc/mtab .
|
|
|
|
.TP
|
2015-01-19 19:11:52 -06:00
|
|
|
.BR \-O , " \-\-test\-opts " \fIoption\fR...
|
2014-07-21 16:56:02 -05:00
|
|
|
Unmount only the filesystems that have the specified option set in
|
2012-08-04 02:33:38 -05:00
|
|
|
.IR /etc/fstab .
|
2014-06-29 10:49:43 -05:00
|
|
|
More than one option may be specified in a comma-separated list.
|
2012-08-04 02:33:38 -05:00
|
|
|
Each option can be prefixed with
|
|
|
|
.B no
|
2014-07-21 16:56:02 -05:00
|
|
|
to indicate that no action should be taken for this option.
|
2012-08-04 02:33:38 -05:00
|
|
|
.TP
|
2018-08-01 02:10:07 -05:00
|
|
|
.BR \-q , " \-\-quiet"
|
|
|
|
Suppress "not mounted" error messages.
|
|
|
|
.TP
|
2014-07-21 16:56:02 -05:00
|
|
|
.BR \-R , " \-\-recursive"
|
|
|
|
Recursively unmount each specified directory. Recursion for each directory will
|
|
|
|
stop if any unmount operation in the chain fails for any reason. The relationship
|
2020-05-28 09:58:19 -05:00
|
|
|
between mountpoints is determined by
|
|
|
|
.I /proc/self/mountinfo
|
|
|
|
entries. The filesystem
|
2014-07-21 16:56:02 -05:00
|
|
|
must be specified by mountpoint path; a recursive unmount by device name (or UUID)
|
2021-03-22 05:29:28 -05:00
|
|
|
is unsupported. Since version 2.37 it umounts also all over-mounted filesystems
|
|
|
|
(more filesystems on the same mountpoint).
|
2012-11-07 12:02:28 -06:00
|
|
|
.TP
|
2015-01-19 19:11:52 -06:00
|
|
|
.BR \-r , " \-\-read\-only"
|
2014-07-21 16:56:02 -05:00
|
|
|
When an unmount fails, try to remount the filesystem read-only.
|
2012-08-04 02:33:38 -05:00
|
|
|
.TP
|
2014-07-21 16:56:02 -05:00
|
|
|
.BR \-t , " \-\-types " \fItype\fR...
|
2014-06-29 10:49:43 -05:00
|
|
|
Indicate that the actions should only be taken on filesystems of the
|
2012-08-04 02:33:38 -05:00
|
|
|
specified
|
|
|
|
.IR type .
|
2014-06-29 10:49:43 -05:00
|
|
|
More than one type may be specified in a comma-separated list. The list
|
|
|
|
of filesystem types can be prefixed with
|
2012-08-04 02:33:38 -05:00
|
|
|
.B no
|
2014-07-21 16:56:02 -05:00
|
|
|
to indicate that no action should be taken for all of the mentioned types.
|
2016-04-15 03:47:12 -05:00
|
|
|
Note that
|
|
|
|
.B umount
|
|
|
|
reads information about mounted filesystems from kernel (/proc/mounts) and
|
2020-05-28 09:58:19 -05:00
|
|
|
filesystem names may be different than filesystem names used in the
|
|
|
|
.I /etc/fstab
|
2019-12-14 16:42:47 -06:00
|
|
|
(e.g., "nfs4" vs. "nfs").
|
2012-08-04 02:33:38 -05:00
|
|
|
.TP
|
2014-07-21 16:56:02 -05:00
|
|
|
.BR \-v , " \-\-verbose"
|
2012-08-04 02:33:38 -05:00
|
|
|
Verbose mode.
|
|
|
|
.TP
|
2014-07-21 16:56:02 -05:00
|
|
|
.BR \-V , " \-\-version"
|
2013-10-14 14:34:39 -05:00
|
|
|
Display version information and exit.
|
2014-07-21 16:56:02 -05:00
|
|
|
.TP
|
|
|
|
.BR \-h , " \-\-help"
|
|
|
|
Display help text and exit.
|
2020-05-19 03:31:19 -05:00
|
|
|
.SH NON-SUPERUSER UMOUNTS
|
mount: no exit on EPERM, continue without suid
The current libmount assumes that mount(8) and umount(8) are suid
binaries. For this reason it implements internal rules which
restrict what is allowed for non-root users. Unfortunately, it's
out of reality for some use-cases where root permissions are no
required. Nice example are fuse filesystems.
So, the current situation is to call exit() always when mount, umount or
libmount are unsure with non-root user rights. This patch removes the
exit() call and replaces it with suid permissions drop, after that it
continues as usually. It means after suid-drop all depend on kernel
and no another security rule is used by libmount (simply because any
rule is no more necessary).
Example:
old version:
$ mount -t fuse.sshfs kzak@192.168.111.1:/home/kzak /home/kzak/mnt
mount: only root can use "--types" option
new version:
$ mount -t fuse.sshfs kzak@192.168.111.1:/home/kzak /home/kzak/mnt
kzak@192.168.111.1's password:
$ findmnt /home/kzak/mnt
TARGET SOURCE FSTYPE OPTIONS
/home/kzak/mnt kzak@192.168.111.1:/home/kzak fuse.sshfs rw,nosuid,nodev,relatime,user_id=1000,group_id=1000
$ umount /home/kzak/mnt
$ echo $?
0
Note that fuse user umount is supported since v2.34 due to user_id= in
kernel mount table.
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-11-19 07:58:20 -06:00
|
|
|
Normally, only the superuser can umount filesystems.
|
|
|
|
However, when
|
|
|
|
.I fstab
|
|
|
|
contains the
|
|
|
|
.B user
|
|
|
|
option on a line, anybody can umount the corresponding filesystem. For more details see
|
|
|
|
.BR mount (8)
|
|
|
|
man page.
|
|
|
|
.PP
|
2020-07-14 04:57:41 -05:00
|
|
|
Since version 2.34 the \fBumount\fR command can be used to
|
|
|
|
perform umount operation also
|
mount: no exit on EPERM, continue without suid
The current libmount assumes that mount(8) and umount(8) are suid
binaries. For this reason it implements internal rules which
restrict what is allowed for non-root users. Unfortunately, it's
out of reality for some use-cases where root permissions are no
required. Nice example are fuse filesystems.
So, the current situation is to call exit() always when mount, umount or
libmount are unsure with non-root user rights. This patch removes the
exit() call and replaces it with suid permissions drop, after that it
continues as usually. It means after suid-drop all depend on kernel
and no another security rule is used by libmount (simply because any
rule is no more necessary).
Example:
old version:
$ mount -t fuse.sshfs kzak@192.168.111.1:/home/kzak /home/kzak/mnt
mount: only root can use "--types" option
new version:
$ mount -t fuse.sshfs kzak@192.168.111.1:/home/kzak /home/kzak/mnt
kzak@192.168.111.1's password:
$ findmnt /home/kzak/mnt
TARGET SOURCE FSTYPE OPTIONS
/home/kzak/mnt kzak@192.168.111.1:/home/kzak fuse.sshfs rw,nosuid,nodev,relatime,user_id=1000,group_id=1000
$ umount /home/kzak/mnt
$ echo $?
0
Note that fuse user umount is supported since v2.34 due to user_id= in
kernel mount table.
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-11-19 07:58:20 -06:00
|
|
|
for fuse filesystems if kernel mount table contains user's ID. In this case fstab
|
|
|
|
user= mount option is not required.
|
|
|
|
.PP
|
|
|
|
Since version 2.35 \fBumount\fR command does not exit when user permissions are
|
|
|
|
inadequate by internal libmount security rules. It drops suid permissions
|
2020-07-14 04:57:41 -05:00
|
|
|
and continue as regular non-root user.
|
|
|
|
This can be used to support use-cases where
|
2019-12-14 16:42:47 -06:00
|
|
|
root permissions are not necessary (e.g., fuse filesystems, user namespaces,
|
mount: no exit on EPERM, continue without suid
The current libmount assumes that mount(8) and umount(8) are suid
binaries. For this reason it implements internal rules which
restrict what is allowed for non-root users. Unfortunately, it's
out of reality for some use-cases where root permissions are no
required. Nice example are fuse filesystems.
So, the current situation is to call exit() always when mount, umount or
libmount are unsure with non-root user rights. This patch removes the
exit() call and replaces it with suid permissions drop, after that it
continues as usually. It means after suid-drop all depend on kernel
and no another security rule is used by libmount (simply because any
rule is no more necessary).
Example:
old version:
$ mount -t fuse.sshfs kzak@192.168.111.1:/home/kzak /home/kzak/mnt
mount: only root can use "--types" option
new version:
$ mount -t fuse.sshfs kzak@192.168.111.1:/home/kzak /home/kzak/mnt
kzak@192.168.111.1's password:
$ findmnt /home/kzak/mnt
TARGET SOURCE FSTYPE OPTIONS
/home/kzak/mnt kzak@192.168.111.1:/home/kzak fuse.sshfs rw,nosuid,nodev,relatime,user_id=1000,group_id=1000
$ umount /home/kzak/mnt
$ echo $?
0
Note that fuse user umount is supported since v2.34 due to user_id= in
kernel mount table.
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-11-19 07:58:20 -06:00
|
|
|
etc).
|
2020-05-19 03:31:19 -05:00
|
|
|
.SH LOOP DEVICE
|
2012-08-04 02:33:38 -05:00
|
|
|
The
|
|
|
|
.B umount
|
2016-08-30 03:25:44 -05:00
|
|
|
command will automatically detach loop device previously initialized by
|
|
|
|
.BR mount (8)
|
2020-05-28 09:58:19 -05:00
|
|
|
command independently of
|
|
|
|
.IR /etc/mtab .
|
2016-08-30 03:25:44 -05:00
|
|
|
|
|
|
|
In this case the device is initialized with "autoclear" flag (see
|
|
|
|
.BR losetup (8)
|
|
|
|
output for more details), otherwise it's necessary to use the option \fB \-\-detach\-loop\fR
|
2019-12-15 18:51:57 -06:00
|
|
|
or call \fBlosetup \-d <device>\fR. The autoclear feature is supported since Linux 2.6.25.
|
2014-07-27 13:58:57 -05:00
|
|
|
.SH EXTERNAL HELPERS
|
2014-07-21 16:56:02 -05:00
|
|
|
The syntax of external unmount helpers is:
|
2012-08-04 02:33:38 -05:00
|
|
|
.PP
|
2014-07-27 13:58:57 -05:00
|
|
|
.RS
|
|
|
|
.BI umount. suffix
|
2014-07-21 16:56:02 -05:00
|
|
|
.RI { directory | device }
|
|
|
|
.RB [ \-flnrv ]
|
2018-06-11 09:27:51 -05:00
|
|
|
.RB [ \-N
|
|
|
|
.IR namespace ]
|
2012-08-04 02:33:38 -05:00
|
|
|
.RB [ \-t
|
2014-07-21 16:56:02 -05:00
|
|
|
.IR type . subtype ]
|
2014-07-27 13:58:57 -05:00
|
|
|
.RE
|
2012-08-04 02:33:38 -05:00
|
|
|
.PP
|
2014-07-31 15:43:29 -05:00
|
|
|
where \fIsuffix\fR is the filesystem type (or the value from a
|
|
|
|
\fBuhelper=\fR or \fBhelper=\fR marker in the mtab file).
|
2014-07-27 13:58:57 -05:00
|
|
|
The \fB\-t\fR option can be used for filesystems that
|
|
|
|
have subtype support. For example:
|
2012-08-04 02:33:38 -05:00
|
|
|
.PP
|
2014-07-27 13:58:57 -05:00
|
|
|
.RS
|
|
|
|
.B umount.fuse \-t fuse.sshfs
|
|
|
|
.RE
|
2014-07-31 15:43:29 -05:00
|
|
|
.PP
|
|
|
|
A \fBuhelper=\fIsomething\fR marker (unprivileged helper) can appear in
|
|
|
|
the \fI/etc/mtab\fR file when ordinary users need to be able to unmount
|
|
|
|
a mountpoint that is not defined in \fI/etc/fstab\fR
|
|
|
|
(for example for a device that was mounted by \fBudisks\fR(1)).
|
|
|
|
.PP
|
|
|
|
A \fBhelper=\fItype\fR marker in the mtab file will redirect
|
|
|
|
all unmount requests
|
|
|
|
to the \fB/sbin/umount.\fItype\fR helper independently of UID.
|
2016-08-30 03:41:05 -05:00
|
|
|
.PP
|
2020-05-29 07:20:47 -05:00
|
|
|
Note that \fI/etc/mtab\fR is currently deprecated and helper= and other
|
2016-08-30 03:41:05 -05:00
|
|
|
userspace mount options are maintained by libmount.
|
2020-05-21 02:28:49 -05:00
|
|
|
.SH ENVIRONMENT
|
|
|
|
.IP LIBMOUNT_FSTAB=<path>
|
|
|
|
overrides the default location of the fstab file (ignored for suid)
|
|
|
|
.IP LIBMOUNT_MTAB=<path>
|
|
|
|
overrides the default location of the mtab file (ignored for suid)
|
|
|
|
.IP LIBMOUNT_DEBUG=all
|
|
|
|
enables libmount debug output
|
2012-08-04 02:33:38 -05:00
|
|
|
.SH FILES
|
2014-07-21 16:56:02 -05:00
|
|
|
.TP
|
2016-12-03 14:13:59 -06:00
|
|
|
.I /etc/mtab
|
2016-08-30 03:41:05 -05:00
|
|
|
table of mounted filesystems (deprecated and usually replaced by
|
2020-05-28 09:58:19 -05:00
|
|
|
symlink to
|
|
|
|
.IR /proc/mounts )
|
2014-07-21 16:56:02 -05:00
|
|
|
.TP
|
2016-12-03 14:13:59 -06:00
|
|
|
.I /etc/fstab
|
2014-07-31 15:43:29 -05:00
|
|
|
table of known filesystems
|
2016-08-30 03:41:05 -05:00
|
|
|
.TP
|
2016-12-03 14:13:59 -06:00
|
|
|
.I /proc/self/mountinfo
|
2016-08-30 03:41:05 -05:00
|
|
|
table of mounted filesystems generated by kernel.
|
2012-08-04 02:33:38 -05:00
|
|
|
.SH HISTORY
|
|
|
|
A
|
|
|
|
.B umount
|
|
|
|
command appeared in Version 6 AT&T UNIX.
|
2020-05-21 02:28:21 -05:00
|
|
|
.SH SEE ALSO
|
|
|
|
.BR umount (2),
|
|
|
|
.BR losetup (8),
|
2020-05-28 09:58:18 -05:00
|
|
|
.BR mount_namespaces (7)
|
2020-05-21 02:28:21 -05:00
|
|
|
.BR mount (8)
|
2012-08-04 02:33:38 -05:00
|
|
|
.SH AVAILABILITY
|
|
|
|
The umount command is part of the util-linux package and is available from
|
2016-12-17 02:06:57 -06:00
|
|
|
.UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
|
2012-08-04 02:33:38 -05:00
|
|
|
Linux Kernel Archive
|
|
|
|
.UE .
|