I'm running arch Linux with i3 window manager and I'm wondering if there's a way to replicate Ubuntu behavior about auto mounting internal partitions and USB. More precisely:

  • Mount all partitions and USB to /media/$USER/$DEV_LABEL or /media/$USER/$DEV_UUID at boot
  • Unmount all previously mounted partitions before shutdown or reboot
  • For all USB, unmount them when they are ejected and mount them when inserted

I know that for the internal partitions i have to add entry to /etc/fstab (I tried and I succeeded), but i want something more dynamic. I tried read something about udev rules, but there's nothing that explains how to accomplish those tasks. Thanks, Federico.


You can use gvfs and udisks to automatically mount USB devices. You can do the same using a file manager that supports automatic mounting. I use PCManFM and gvfs and my USB devices are automatically mounted to /run/media/$USER/$DEV_LABEL.

  • Thanks for the answer, I will try. In the meantime I've implemented some udev rules with a couple of bash scripts. When I'm done writing them I'll post an answer with all I've come up. – Federico Belotti Jul 2 '16 at 8:55

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.