umount(8)

umount8

Unmount file systems

Usage

umount {[-fv] special | node}

umount -a [-fv] [-h host] [-t type]

Overview

The umount command calls the unmount(2) system call to remove a special device or node ([rhost:] path) from the file system tree. Multiple devices and nodes may be specified on the command line. If neither special nor node are provided, the appropriate information is taken from the kernel.

The options are as follows:

-a

All of the file systems except root returned by getmntinfo(3) are unmounted.

-f

The file system is forcibly unmounted. Active special devices continue to work, but all other files return errors if further accesses are attempted. The root file system cannot be forcibly unmounted.

-h host

Only filesystems mounted from the specified host will be unmounted. This option implies the -a option and, unless otherwise specified with the -t option, will only unmount NFS filesystems.

-t type

Indicates that actions should only be taken on filesystems of the specified type. More than one type may be specified in a comma separated list. The list of filesystem types can be prefixed with “no” to specify the filesystem types for which action should not be taken. For example, the following command unmounts all filesystems of type NFS and MFS:

# umount -a -t nfs,mfs
-v

Verbose, additional information is printed out as each file system is unmounted.

Releases

61 releases since OpenBSD 2.1; the text changed 12 times.

  1. 2.1
  2. 2.2–2.3
  3. 2.4
  4. 2.5
  5. 2.6–2.8
  6. 2.9–3.0
  7. 3.1–3.3
  8. 3.4–3.8
  9. 3.9
  10. 4.0
  11. 4.1
  12. 4.2–6.5
  13. 6.6–8.0

-t since OpenBSD 4.0.

History

A umount command appeared in Version 1 AT&T UNIX.

From man 8.0-current-20261101 in OpenBSD 8.0-current (2026-11-01). Parsed by carta from the page's mdoc source.