Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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

Auto-mounting seems to be a bit of a messy thing in linux.

The options to automount ranges from autofs, udev, hal or even filemanagers.

What is the best-practice method to enable automounting on devices? Is there one shinning way that cuts out all the mess?

share|improve this question
I usually use fstab (/etc/fstab), it seemed like the easiest thing to do (no extra dependencies). Although autofs seems like the way to go if you want to spare some resources. – Gert Nov 18 '10 at 7:59
@Gert /etc/fstab is definitely not a good option for removable devices. You need root privileges to edit it, and your system may fail to boot normally if you mess it up. – Dmitry Grigoryev May 31 at 5:53
up vote 3 down vote accepted

I would say the best practice is to go with what works best with your "desktop envorinment", as some automounting methods may not work well with, say KDE, since KDE wants to handle it.

share|improve this answer

If your system is modern enough to support System D and D-Bus, the standard way to handle automount is via udisks2 package. The link above targets a Debian package, but udisks2 is provided in other distributions as well.

Most desktop environments provide mount/eject features in their file managers by pulling this package as a dependency:

The Gnome Virtual File System provides mounting and trash functionality. GVFS uses udisks2 for mounting functionality and is the recommended solution for most file managers.

Of course, a desktop environment is not a requirement for udisks2 (it uses udev behind the scenes), so it can also be used on headless installations.

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.