USB drives can be easily and automatically mounted on Ubuntu Server with the help of USBmount which is available from the Ubuntu and Debian repositories. Fortunately, USBmount requires little configuration in order to work. The following was tested in Debian 7 Wheezy and Ubuntu 13.04.
Make sure you run apt-get update/upgrade before starting the tutorial.
1 | sudo apt-get update |
Now install USBmount from the repositories.
1 | sudo apt-get install usbmount |
USBmount mounts all USB drives in /media/usb*. Now plug a USB drive and wait for it to be detected and mounted. As long as the host OS supports the File System it should be mounted. To verify whether the USB drive was mounted correctly you can use df -h to view all available drives and their respective mount points. My 4GB USB drive is accessible from the /media/usb0 mount point.
1 | user@debian:~$ df -h |
To un-mount a drive you can use umount.
1 | sudo umount /media/usb0 |
USBmount is quite handy for mounting USB drives with no effort.