udiskctl

Allows you to mount/unmount e.g. usb sticks and other block devices as your personal user. The same method is used, e.g. if you are running a windowmanager + nautlius

Comamnds and Descriptions

for details about {device_definition} please have a look below at Device Specification

CommandsDescriptions
udisksctl statusShows overall status of devices
udisksctl info {device_definition}This shows detailed information about device/object
udisksctl mount {device_definition} [--filesystem-type TYPE] [--options OPTIONS...] [--no-user-interaction]Mounts a device/object beneath /run/media
udisksctl unmount {device_definition} [--force] [--no-user-interaction]Unmounts a device/object
udisksctl unlock {device_definition} [--no-user-interaction] [--key-file PATH] [--read-only]Unlocks encrtpyed devices bei asking for pwd or using key file
udisksctl lock {device_definition} [--no-user-interaction]Locks unencypted device again
udisksctl loop-setup --file PATH [--read-only] [--offset OFFSET] [--size SIZE] [--no-user-interaction]Creates a loop device backend via file
udisksctl loop-delete {device_definition} [--no-user-interaction]Brings doen loop device again
udisksctl power-off {device_definition} [--no-user-interaction]Initials power off of device for safely removal
udisksctl smart-simulate --file PATH {device_definition} [--no-user-interaction]Used to simulate smart data while debugging on failing disks
udisksctl monitorMonitors events of udisksd (daemon)
udisksctl dumpDisplays the current state of udisksd
udisksctl helpShows the help

Device Specification

SpecificationDescription
-b, --block-device=DEVICESpecify a device by its device file path. For example /dev/sda.
-p, --object-path=OBJECTSpecify a device by the UDisks internal object path without the /org/freedesktop/UDisks2 prefix. For example block_devices/sda for the /dev/sda disk.
-d, --drive=DRIVESpecify a drive by name, for example VirtIO_Disk. This can be currently used only together with the info command.

Sounds super usefull

mount/unmount

mount will ensure that the device/object is getting mounted beneath /run/media and ensures that your user is able to access it and the good thing is, you don’t need to run this as root user. The same goes for umount of course.

power-off

Arranges for the drive to be safely removed and powered off. On the OS side this includes ensuring that no process is using the drive, then requesting that in-flight buffers and caches are committed to stable storage. The exact steps for powering off the drive depends on the drive itself and the interconnect used. For drives connected through USB, the effect is that the USB device will be deconfigured followed by disabling the upstream hub port it is connected to.

Help

$ udisksctl help
Usage:
  udisksctl COMMAND

Commands:
  help            Shows this information
  info            Shows information about an object
  dump            Shows information about all objects
  status          Shows high-level status
  monitor         Monitor changes to objects
  mount           Mount a filesystem
  unmount         Unmount a filesystem
  unlock          Unlock an encrypted device
  lock            Lock an encrypted device
  loop-setup      Set-up a loop device
  loop-delete     Delete a loop device
  power-off       Safely power off a drive
  smart-simulate  Set SMART data for a drive

Use "udisksctl COMMAND --help" to get help on each command.