Commands · Command
CommandLinuxmacOS
umount
umount [device or mountpoint]Detaches ("unmounts") a previously mounted filesystem, so it can be safely removed or remounted elsewhere.
// FLAGS
-fforce unmount, for an unresponsive filesystem-llazy unmount — detach now, clean up once nothing is using it// EXAMPLE
umount /mnt/data — unmounts the filesystem at /mnt/data.
// GOTCHA
umount fails with "device is busy" if any process still has an open file or working directory on that filesystem — lsof or fuser can identify what's holding it open.
// RELATED COMMANDS