Add important policies tip for udisksctl

Without knowledge of this, people trying out an Ubuntu- or Debian-based
distribution will be frustrated when trying to use udisksctl(1). I ran
into this situation myself, so discovering this was a relief.
pull/130/head
terminalforlife 4 years ago
parent a559fd580f
commit 98dd514d7b

@ -1,20 +1,34 @@
# udisksctl
# The udisks command line tool
# Output low-level information for the provided block device and partition.
udisksctl info -b /dev/sdd1
# Mount partition on the given block device. This will by default use '/media', and
# on typical systems won't even require root privileges.
# Mount partition on the given block device. This will by default use
# '/media', and on typical systems won't even require root privileges.
udisksctl mount -b /dev/sd??
# Set up a loop device using 'imagefile'. This only sets it up, so you will
# probably also want to mount it thereafter, using the device given to you after
# executing this command. often, if not always, this is '/dev/loopX', where X is
# the loop device number.
# probably also want to mount it thereafter, using the device given to you
# after executing this command. often, if not always, this is '/dev/loopX', -
# where X is the loop device number.
udisksctl loop-setup -f image file
# Like the above, except this will delete the loop device (assuming 'loop0' was
# previously created) but note that this will NOT delete the image file. Be sure to
# unmount the filesystem(s) on the device first, before deleting it.
# previously created) but note that this will NOT delete the image file. Be
# sure to unmount the filesystem(s) on the device first, before deleting it.
udisksctl loop-delete -b /dev/loop0
# Power off a block device. May not work for all devices, and may vary in effect.
# Power off block device. May not work for all devices, and may vary in effect.
udisksctl power-off -b /dev/sdb
# Example of a suitable mount request for auto-mounting at startup. Useful if
# fstab isn't playing nice. This also demonstrates using `mount`-style options.
udisksctl mount --no-user-interaction --options noatime -b /dev/sde1
# In some distributions of Linux, such as an Ubuntu 18.04 base install, will
# not have its policies set to allow regular users to mount filesystems with
# udisksctl(1) without root access, despite that being the point of this tool.
# This can be resolved by updating the policies to this effect. In Ubuntu 18.04
# it's as easy as a simple package installation procedure.
sudo apt-get install policykit-desktop-privileges

Loading…
Cancel
Save