umount
Command
The umount
command enables you to remove a remote file system that is currently mounted. You can use the following options with the umount
command:
-
-V
-
Enables testing
-
-a
-
Unmounts several file systems at one time. If mount-points are included with the
-a
option, those file systems are unmounted. If no mount points are included, an attempt is made to unmount all file systems that are listed in/etc/mnttab
except for the "required" file systems, such as/
,/usr
,/var
,/proc
,/dev/fd
, and/tmp
. Because the file system is already mounted and should have an entry in/etc/mnttab
, you do not need to include a flag for the file system type. -
-f
-
Forces a busy file system to be unmounted. You can use this option to unhang a client that is hung while trying to mount an unmountable file system.
Caution:
By forcing an unmount of a file system, you can cause data loss if files are being written to that system.Example 5-1 Unmounting a File System
The following example unmounts a file system that is mounted on /usr/man
:
# umount /usr/man
Example 5-2 Using Options with umount
The following example displays the results of running umount
-a -V
:
# umount -a -V
umount /home/kathys
umount /opt
umount /home
umount /net
Note that this command does not actually unmount the file systems.