Sunday, April 9, 2017

udisksctl

For most users these days, accessing flash drives in Linux is handled nicely by the desktop and file managers. But sometimes it's convenient to be able to mount a flash drive from the command line, as a normal user; for that, try the udisksctltool.

I tested this in Antergos, in Debian Stable ("Jessie"), and in Debian Testing ("Stretch"). Insert the flash drive and run lsblk to check for the device name:

sdb1 is the device name for my flash drive. To mount it, I used:

$ udisksctl mount -b /dev/sdb1

The -b switch is short for --block-device, according to udisksctl mount --help.