udiskie-mount
Mount removable media
TLDR
Mount all handleable devices
Mount a specific device
Mount a device with verbose output
Display help
SYNOPSIS
udiskie-mount [OPTIONS] DEVICE
udiskie-mount [OPTIONS] --uuid UUID
udiskie-mount [OPTIONS] --label LABEL
PARAMETERS
DEVICE
The path to the block device or partition to mount (e.g., /dev/sdb1).
-o, --options OPTIONS
A comma-separated list of mount options (e.g., ro,noexec,noatime). These options are passed directly to the underlying mount system call.
-t, --fstype TYPE
Explicitly specify the filesystem type (e.g., ext4, vfat, ntfs). If omitted, udiskie attempts to autodetect the filesystem type.
--mount-point PATH
Specify the exact directory where the device should be mounted. If not provided, udiskie will typically choose a default location, often under /media or /run/media.
--uuid UUID
Identify the device to mount by its Universal Unique Identifier instead of a device path. This is a more robust way to refer to devices.
--label LABEL
Identify the device to mount by its filesystem label. This is another persistent way to refer to devices.
--no-block
Do not block; exit immediately after issuing the mount request, without waiting for the mount operation to complete.
--no-autoselect
When a device path refers to a whole disk (e.g., /dev/sdb), do not automatically select the first suitable partition on that disk. Instead, require a specific partition path.
-h, --help
Display a help message and exit.
-v, --version
Show program's version number and exit.
DESCRIPTION
udiskie-mount is a command-line utility designed to simplify the mounting of removable storage devices, such as USB drives, external hard drives, and optical media. It acts as a user-friendly frontend to the underlying UDisks2 D-Bus interface, enabling users to mount devices without requiring direct root privileges for most operations. The command leverages PolicyKit/Polkit for handling necessary permissions and often attempts to automatically detect the appropriate filesystem type and a suitable mount point if not explicitly specified. While often a symlink or wrapper script, its primary function is to provide an accessible way for users to manage their storage media within desktop environments, frequently integrating with the udiskie daemon for automatic device detection and management.
CAVEATS
- Dependency on UDisks2: udiskie-mount fundamentally relies on the udisksd daemon (from UDisks2) being active and running. If udisksd is unavailable, the command will fail.
- PolicyKit/Polkit Permissions: User permissions for mounting devices and using specific mount options are managed by PolicyKit/Polkit. If the current user lacks the necessary authorizations, the operation will be denied, potentially prompting for authentication or returning an error.
- Automatic Mount Point Behavior: When a mount point is not explicitly specified, udiskie attempts to create one. Users must have write permissions to the parent directory (e.g., /media/$USER or /run/media/$USER) for this to succeed.
- Mount Option Interaction: The final set of mount options applied might be influenced by UDisks2's internal configuration, PolicyKit rules, and fstab entries, which could potentially override or add to options provided by the user.
AUTOMATIC MOUNT POINT GENERATION
When the --mount-point option is not provided, udiskie-mount will typically generate a default mount point. This mount point is usually created under a user-specific directory like /run/media/<username>/<device_label_or_uuid>, or sometimes under /media/<username>/<device_label_or_uuid>. This behavior ensures that each mounted device has a unique and descriptive location without requiring manual intervention from the user.
INTERACTION WITH UDISKS2 DAEMON
udiskie-mount does not perform low-level mounting operations directly. Instead, it communicates with the running udisksd daemon via the D-Bus system bus. udisksd then handles the actual mounting process, including filesystem probing, device management, and interacting with PolicyKit for privilege escalation. This architecture allows udiskie-mount to provide a secure and user-friendly interface without needing direct root privileges itself.
HISTORY
The udiskie project, which includes the functionality behind udiskie-mount, originated as a lightweight and user-friendly solution for managing removable media in Linux desktop environments. It emerged to provide a simpler alternative to more complex disk management tools, specifically by offering a Python-based wrapper around the UDisks2 D-Bus interface. UDisks2 itself succeeded the older UDisks framework. Since its inception, udiskie-mount (or the equivalent udiskie mount subcommand) has been a core component, enabling non-privileged users to easily mount and unmount storage devices, focusing on simplicity, automatic detection, and seamless integration with the desktop environment. Its development has been community-driven, emphasizing a minimalistic approach to disk management.


