Ubuntu – How to get USB Devices to AutoMount in Ubuntu 12.04 Server

automountUbuntuubuntu-12.04usb

In Ubuntu 12.04 Desktop, USB devices can be plugged in, and they just work for the most part.

In Ubuntu 12.04 Server, when I plug in a USB device it does nothing.

How can I setup server do act like desktop when it comes to adding USB devices such as printers, scanners, and thumb-drives?

Ultimately I will be forwarding this USB devices to a VirtualBox virtual machine. However, if Ubuntu server doesn't mount them in some way, I can't get VirtuaBox to see them either.

Best Answer

From the Ubuntu documentation, try installing usbmount.

sudo apt-get install usbmount

Here is the description from the repo:

automatically mount and unmount USB mass storage devices This package automatically mounts USB mass storage devices (typically USB pens) when they are plugged in, and unmounts them when they are removed. The mountpoints (/media/usb[0-7] by default), filesystem types to consider, and mount options are configurable. When multiple devices are plugged in, the first available mountpoint is automatically selected. If the device provides a model name, a symbolic link /var/run/usbmount/MODELNAME pointing to the mountpoint is automatically created.

When using automount, it will mount the storage devices at /media/usb[0-7] (there is no dialog).

Printers/scanners are not "mounted" and would be configured differently. Although, if your end goal is to just pass these along to your Windows guest, you need to install the VirtualBox Extension Pack, from here https://www.virtualbox.org/wiki/Downloads. The devices to not need to be set up within your Ubuntu host prior to using them with your Windows guest.