2024-01-10 00:08:42 -03:00
|
|
|
# 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:
|
|
|
|
|
2025-08-16 21:08:05 +03:00
|
|
|
`sudo umount {{path/to/device_file}}`
|
2024-01-10 00:08:42 -03:00
|
|
|
|
|
|
|
- Unmount a filesystem, by passing the path to the target where it is mounted:
|
|
|
|
|
2025-08-16 21:08:05 +03:00
|
|
|
`sudo umount {{path/to/mounted_directory}}`
|
2024-01-10 00:08:42 -03:00
|
|
|
|
|
|
|
- When an unmount fails, try to remount the filesystem read-only:
|
|
|
|
|
2025-08-16 21:08:05 +03:00
|
|
|
`sudo umount {{[-r|--read-only]}} {{path/to/mounted_directory}}`
|
2024-01-10 00:08:42 -03:00
|
|
|
|
|
|
|
- Recursively unmount each specified directory:
|
|
|
|
|
2025-08-16 21:08:05 +03:00
|
|
|
`sudo umount {{[-R|--recursive]}} {{path/to/mounted_directory}}`
|
2024-01-10 00:08:42 -03:00
|
|
|
|
|
|
|
- Unmount all mounted filesystems (except the `proc` filesystem):
|
|
|
|
|
2025-08-16 21:08:05 +03:00
|
|
|
`sudo umount {{[-a|--all]}}`
|