How to install Oracle Virtualbox with USB support in Linux

Default featured post

Most of Linux distros have open source version of Virtualbox in their repository which used to be called Virtualbox OSE (Open Source Edition). For instance, Virtualbox OSE packages are available by default in Debian and Ubuntu. Open source version is good enough for installing various guest operating systems but it does not have some features (closed source) of Oracle Virtualbox and one of the most important of those features is USB support. In order to support USB in VirtualBox, you should install an extra package (extension package) and install it. Although, you can install this package on Virtualbox OSE, I highly recommend to install extension package with Oracle Virtualbox if you do not want to face troubles such as incompatibility between different versions or other things. In this post, I will demonstrate how to install Oracle Virtualbox and USB support.

First thing that you need to do before downloading any packages is to remove Virtualbox OSE from your machine because if it is installed then the system will not allow you to install Oracle version and give you error. In Debian based distros easily you can remove Virtualbox from Synaptic package manager or by typing following command in terminal.

$ sudo apt-get remove virtualbox

Now you should click on this link to go to download page of Virtualbox Oracle. On that page you should select for which type of machine and Linux distros you want to download Virtualbox. If you could not find any package for your distro download all distribution package based on your computer architecture. If your machine is running 32 bit OS download 32 bit package or if your machine is running 64 bit OS download 64 bit version.

Now after downloading Oracle Virtualbox package you should install it. Installation process could be different based on your Linux distro. Here I explain, installation process for Debian based distros.

For installing you can either double click on the package to lunch package manager (such as Synaptic) and install the package or you can install it in terminal with using dpkg (for .deb package) command like following,

$ sudo dpkg -i VirtualBox.deb

After finishing installation, you should download extension package for USB support. Extension package is available on download page of Virtualbox. Bear in mind that you should select the same version of extension package as your Virtualbox version. In other word, the version of both extension package and Virtualbox should be the same. For installing extension package just double click on the downloaded file and Virtualbox automatically will install it.

Finally, you should add your user name to Virtualbox group in order to be able to use it. For adding user to Virtualbox group use adduser command like below,

$ sudo adduser MyUserName vboxusers

At the end reboot your system for applying all changes. Now after rebooting you can enjoy USB support on Oracle Virtualbox. For enabling USB support for specific guest OS, click on the setting of guest in Virtualbox and select USB from left menu, now click on USB icon which has green plus sign (add filter icon) such as below picture.

Finally select your USB device which you want to attach it to your guest machine. Keep in your mind to install Virtualbox Guest additions as well.

For more information please refer to following links.