systemd-umount
Unmount a file system
TLDR
View documentation for the original command
SYNOPSIS
systemd-umount [OPTIONS] [MOUNTPOINT|DEVICE|UNIT]
systemd-umount [OPTIONS] --all
PARAMETERS
-a, --all
Unmounts all filesystems specified in /etc/fstab that are managed by systemd mount units. Unmounts are performed in reverse dependency order.
-t TYPE, --types=TYPE
When used with --all, limits unmounting to filesystems of the specified comma-separated types (e.g., 'ext4,xfs').
-O OPTION, --options=OPTION
When used with --all, limits unmounting to filesystems that have the specified comma-separated mount options configured in their unit or /etc/fstab entry.
--no-block
Does not wait for the unmount operation to complete. The command returns immediately after issuing the unmount request.
-R, --recursive
Recursively unmounts specified mount points and their children.
-v, --verbose
Enables verbose output, providing more details about the unmount process.
-h, --help
Displays a help message and exits.
--version
Shows the version information and exits.
DESCRIPTION
systemd-umount is a low-level utility designed to unmount filesystems managed by the systemd init system. It primarily acts as a compatibility wrapper around the more commonly used systemctl umount command, offering a subset of options familiar from the traditional umount(8) utility. Its core function is to interact with systemd's internal mount units (e.g., those generated from /etc/fstab entries or explicitly defined via .mount unit files) to gracefully shut down and unmount filesystems.
While users typically interact with mount operations via systemctl umount, systemd-umount can be invoked directly, particularly in scripts or by systemd itself during system shutdown or when managing service dependencies. When used with the --all option, it attempts to unmount all configured filesystems in reverse dependency order, ensuring a clean system state and respecting systemd's dependency tree.
CAVEATS
While systemd-umount offers compatibility with some umount(8) options, it's generally recommended to use systemctl umount for user-level interactions, as it provides a more robust and feature-rich interface to systemd's mount management capabilities. systemd-umount primarily functions by communicating with the systemd manager, which then performs the actual unmount operations, respecting unit dependencies and states. Unmounting busy filesystems may fail unless processes accessing them are stopped or killed.
INTERACTION WITH SYSTEMCTL
systemd-umount effectively translates its arguments into a systemctl umount command or interacts directly with the systemd bus. For most user-facing unmount tasks, systemctl umount is the preferred and more flexible command, offering features like unit status querying and more explicit control over mount units.
HISTORY
systemd-umount was introduced as part of the systemd init system to provide a unified approach to filesystem management, integrating it with systemd's concept of units and dependencies. It superseded some traditional unmounting methods by delegating the task to the systemd manager, ensuring that unmount operations are performed in a consistent and ordered manner, especially during system shutdown or service restarts.