cmdxray / commands / umount

What does umount do?

detach (unmount) a mounted filesystem.

▸ Explain your own umount command →

umount examples, explained

$ umount /mnt

  • umountdetach (unmount) a mounted filesystem
  • /mntan argument passed to the command

$ umount -l /mnt/nfs

  • umountdetach (unmount) a mounted filesystem
  • -llazy unmount — detach now, clean up once it is no longer busy
  • /mnt/nfsan argument passed to the command

$ umount -a -t nfs

  • umountdetach (unmount) a mounted filesystem
  • -aunmount every filesystem listed in /etc/mtab
  • -tact only on filesystems of the given type
  • nfsvalue for -t

umount flags & options

-aunmount every filesystem listed in /etc/mtab
-fforce the unmount (useful for an unreachable NFS mount)
-llazy unmount — detach now, clean up once it is no longer busy
-rif the unmount fails, remount the filesystem read-only instead
-nunmount without writing to /etc/mtab
-Rrecursively unmount the given directory and everything below it
-tact only on filesystems of the given type
-vverbose output
-Oact only on filesystems with the given mount options

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.