I have been wondering how this is possible (i.e. how this works internally). When you want to mount a directory you have to be root.

sudo mount /dev/something /mnt/somedir

I know you can get around that by adding a line in fstab.

Now, I'm wondering how come if I insert let's say an usb stick and select it from within Dolphin (KDE's filemanager), it mounts it without the need for a root password and gives me write/read access to what it has mounted? I'm guessing it is using dbus to monitor for new devices. I don't see how (when it knows there is something it should be mounted) it can mount it without the need for root. I haven't yet figured out how to manually mount some device without root and maybe I can learn something from how Dolphin does it.

  • 3
    Read Dbus and ConsoleKit. A similar question which might help you: unix.stackexchange.com/questions/45302/…
    – darnir
    Jan 27, 2013 at 10:11
  • Arch doesn't use ConsoleKit anymore but instead logind But the concepts mentioned on darnir's comment still apply.
    – lmcanavals
    Jan 28, 2013 at 6:32
  • @darnir, what is the "dbus-send" command to mount?
    – Nicolas
    Jan 28, 2013 at 17:19

1 Answer 1


This is done by udisks. There are two versions of udisks, "udisks" and "udisks2". You have probably installed at least one of them. Both ship with commandline utilities. Both should work when Dolphin works.

udisks mounts the filesystems into /media/<label>.

$ udisks --mount /dev/sdc1
Mounted /org/freedesktop/UDisks/devices/sdc1 at /media/<label>
$ udisks --unmount /dev/sdc1

The utility for udisks2 is called udisksctl. It uses /run/media/$USERNAME/<label>

$ udisksctl mount -b /dev/sdc1
Mounted /dev/sdc1 at /run/media/t-8ch/<label>.
$ udisksctl unmount -b /dev/sdc1
Unmounted /dev/sdc1.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.