Detach filesystems cleanly and recover from busy mounts using the umount command. 20.05.2026 | reading time: 2 min Unmounting sounds trivial, but a wrong detachment risks data loss or a hung device; umount is the Linux command to detach a mounted filesystem by mount point or device and should be the first tool you reach for when removing storage. Unmount a USB stick Do this: check the mount, then unmount by path; example session: ``` $ mount | grep /mnt/usb /dev/sdb1 on /mnt/usb type vfat (rw,nosuid,nodev) $ sudo umount /mnt/usb $ echo $? 0 ``` If the command returns zero the device is detached and safe to remove. Busy target troubleshooting If umount fails with "target is busy" find and stop users of the mount: try `lsof /mnt/usb` or `fuser -m /mnt/usb`, stop the offending process or close the file; alternatively use `sudo umount -l /mnt/usb` for a lazy unmount or `sudo umount -f /mnt/usb` only when appropriate for network filesystems. Options and edge cases Useful flags include `-a` to unmount according to fstab rules, `-t` to limit by filesystem type, `-l` for lazy unmount, `-f` for forced unmount, and `--recursive` to unmount nested mounts under a directory; remember that `umount -n` avoids writing /etc/mtab and is handy in rescue environments. Helpers and verification After unmounting, verify with `mount`, `findmnt` or `lsblk`; when automounted devices reappear check systemd-udev or automount rules and remove stale entries from fstab or /etc/mtab if necessary to prevent surprises. Finish line Mastering umount means he can remove storage safely, debug busy mounts, and choose the right option for each scenario; keep practicing and consider certifying skills with CompTIA Linux+ or LPIC-1, and use bitsandbytes.academy for intensive exam preparation. Join Bits & Bytes Academy First class LINUX exam preparation. filesystem utilities storage troubleshooting