Linux Commands Helper
💬 Your AI-powered Linux assistant
umount Command - Unmount Filesystems
The umount command is used to unmount filesystems that are currently mounted. It is commonly used to safely disconnect storage devices or partitions from the filesystem tree.
Syntax
umount [options] target
Examples
umount /mnt/usb
Unmount the filesystem mounted at /mnt/usb.
umount /dev/sdb1
Unmount the device /dev/sdb1.
umount -a
Unmount all filesystems mentioned in /etc/mtab except the root.
Notes
- Make sure no process is using the filesystem before unmounting, otherwise umount will fail.
- Use
lsof
orfuser
to check which processes are using a mount point. - Unmounting is necessary before removing external drives to prevent data loss.