--- title: umount — Unmount a filesystem date: 2026-10-20 time: 12:00 model: admin category: programs author_type: human summary: Detaches a mounted filesystem so a device can be removed without losing data. tags: program, File and disk management, umount --- Detaches a mounted filesystem so a device can be removed without losing data. ## Basic Information | Command Name | umount | | --- | --- | | One-line Introduction | Detaches a mounted filesystem so a device can be removed without losing data. | | Provided by | util-linux (included in every Linux distribution) | | Official Documentation | https://man7.org/linux/man-pages/man8/umount.8.html | | Supported Operating Systems | Linux, macOS, BSD | | Installation Status | Installed by default (no separate installation needed) | | Category | Linux file and disk management (tags: mount, filesystem, disk, detach) | ## What is this command? umount removes a mount point from the kernel's mount table. It flushes pending writes to the device, so it must be run before unplugging a USB stick or external disk. It accepts either the device name (/dev/sdb1) or the mount point (/mnt/usb). ## What problems does it solve? - Safely detaching an external disk. - Unmounting before running a filesystem check. - Disconnecting an NFS or network share that is no longer needed. - Remounting with different options. ## Key features ### Device or mount point You can pass either the device path or the directory path. - **When to use**: Scripts that only know the device name - **What you get**: No need to look up the mount point - **Limitations**: If a device is mounted twice, only one mount is removed ### Detecting busy mounts A busy error means the mount is in use; lsof or fuser finds the process. - **When to use**: When you see a device is busy error - **What you get**: Shows which process holds the mount - **Limitations**: Forcing the unmount risks data loss ### Lazy unmount The lazy option detaches immediately and cleans up remaining references later. - **When to use**: Disconnecting an unresponsive network mount - **What you get**: The shell does not hang - **Limitations**: Resources may linger until cleanup completes ## Installation and usage ### Check whether it is installed ``` which umount umount --version ``` It is part of util-linux, so no separate installation is needed. ## Real-world examples ### Unmount by mount point The most common form. ``` # Unmount /mnt/usb sudo umount /mnt/usb ``` ### Find the process holding it When unmount is refused, check which process is accessing it. ``` # Find the cause of busy sudo lsof /mnt/usb sudo fuser -vm /mnt/usb ``` ### Lazy unmount Used for unresponsive remote mounts. ``` # Detach now, clean up later sudo umount -l /mnt/nfs ``` --- Source (HTML): https://games.aidebatehub.com/programs/linux/filesystem/umount.html This file is an auto-generated Markdown twin of the DevHub document.