Linux umount Command
The Linux umount (full English spelling: unmount) command is used to unmount file systems.
umount can unmount file systems currently mounted in Linux directories.
Syntax
umount [-ahnrvV][-t <文件系统类型>][文件系统]
Parameters:
- -a Unmount all file systems recorded in /etc/mtab.
- -h Show help.
- -n Do not store information in the /etc/mtab file when unmounting.
- -r If unmounting fails, attempt to remount the file system as read-only.
- -t<file system type> Unmount only the file systems specified in the option.
- -v Display detailed information during execution.
- -V Display version information.
- [file system] In addition to directly specifying the file system, you can also use the device name or mount point to represent the file system.
Examples
The following two commands unmount the file system via the device name and mount point respectively, while outputting detailed information:
# umount -v /dev/sda1 通过设备名卸载 /dev/sda1 umounted # umount -v /mnt/mymount/ 通过挂载点卸载 /tmp/diskboot.img umounted
If the device is busy, unmounting fails. A common cause of unmount failure is that an open shell's current directory is a directory within the mount point:
# umount -v /mnt/mymount/ umount: /mnt/mymount: device is busy umount: /mnt/mymount: device is busyOther Extensions
Linux Command Reference