Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Some systems use udev / pmount to automatically mount thumbdrives. How is that solved in Ubuntu (specifically, Ubuntu 12.04)? Apparently, neither the pmount package nor the corresponding udev rules are present, yet Ubuntu mounts the inserted USB drives automatically. How does that happen?

share|improve this question
up vote 12 down vote accepted

In Ubuntu 12.04 (Unity, and presumably Gnome Shell/Classic) automounting is handled by GNOME Desktop/Nautilus, which monitors DBus events for insertion, etc. The gvfs* backend is used, in co-operation with udisks for the low-level mounting, etc.

gvfs-mount is used internally, and running it in monitor mode with the -o switch will show, for example:

$ gvfs-mount -o

Monitoring events. Press Ctrl+C to quit.
Drive connected:    'usb Flashdisk'
Volume added:       'DISK_IMG'
Volume changed:     'DISK_IMG'
Mount added: 'DISK_IMG'
Volume changed:     'DISK_IMG'
Mount changed: 'DISK_IMG'
Mount removed: 'DISK_IMG'
Volume changed:     'DISK_IMG'
Drive disconnected: 'usb Flashdisk'
Volume removed:     'DISK_IMG'
share|improve this answer
When I opened this post there was no answer. In the 4 minutes I was getting that link, you answered. – spudowiar Sep 30 '12 at 8:16
No problem, that's happened to me many times too - sometimes it will alert "1 new answer", other times you only see it after you've answered :) – izx Sep 30 '12 at 8:30
@izx: +1 nice answer! Do you also know a method to re-trigger USB automount process after you dismount the drive manually? Personally, I always use pmount, and most people simply unplug and replug the USB cable. I think that a single command able to reproduce the Ubuntu automount process would be greatly appreciated by everybody... – Avio Sep 30 '12 at 14:07

GNOME deals with it. See

share|improve this answer


/usr/bin/gvfs-mount --device=/dev/sdd1


/usr/bin/gvfs-mount --eject /media/$USER/disk
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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