1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-09-03 23:53:31 +02:00
tldr/pages/linux/umount.md
Managor 5d62421af1
umount: add sudo (#17605)
Update umount.md
2025-08-16 11:08:05 -07:00

25 lines
777 B
Markdown

# umount
> Unlink a filesystem from its mount point, making it no longer accessible.
> A filesystem cannot be unmounted when it is busy.
> More information: <https://manned.org/umount.8>.
- Unmount a filesystem, by passing the path to the source it is mounted from:
`sudo umount {{path/to/device_file}}`
- Unmount a filesystem, by passing the path to the target where it is mounted:
`sudo umount {{path/to/mounted_directory}}`
- When an unmount fails, try to remount the filesystem read-only:
`sudo umount {{[-r|--read-only]}} {{path/to/mounted_directory}}`
- Recursively unmount each specified directory:
`sudo umount {{[-R|--recursive]}} {{path/to/mounted_directory}}`
- Unmount all mounted filesystems (except the `proc` filesystem):
`sudo umount {{[-a|--all]}}`