Install VirtualBox (with full USB Support) in Ubuntu Linux

One of the more popular virtualization options for Linux users is VirtualBox, from Oracle.  VirtualBox makes it possible to run other operating systems inside Linux.  You can install Windows, other Linux distributions, and even Mac OS X (if your hardware supports it), among others.  Prior to VirtualBox 4, there were two editions available.

The open source edition (known as VirtualBox OSE), had some features – namely USB support – removed; a closed source version – with USB support included – was only available from Sun (the prior owner of VirtualBox).

VirtualBox is now completely open source, so if you download VirtualBox 4, you have the same VirtualBox that everyone else does.  The closed source bits, which also include support for remote desktop functions and the Intel PXE boot ROM, are not shipped with any version of VirtualBox, but only as an extension pack.

Here’s how to download and install VirtualBox in Ubuntu (so that you’ll always be kept up-to-date), and the extension pack, for full compatibility with USB 2.0 devices.

Add the Official VirtualBox Repository

The first step to installing VirtualBox is to add its repository to your list of software sources.  To do this, we need to open our sources.list file (as root), so open up a Terminal window.

Open A Terminal Window

Now type “gksudo gedit /etc/apt/sources.list” (without the quotes), and hit Enter.  If you’ve recently run another program as root, then gedit will open up with your sources.list file; if not, you’ll be asked to enter your root password.

Once you’ve entered your password (if necessary), you’ll see this window:

Sources list

Add the following line at the bottom of the sources.list file:

deb http://download.virtualbox.org/virtualbox/debian lucid contrib non-free

Note: if you’re using Maverick or Karmic or Hardy, replace “lucid” in the above line with your version of Ubuntu (use all lowercase letters).

Once you’ve done this, save the file by clicking the Save button, then quit the text editor.

Save Button

You’ll be taken back to the Terminal, where we will now install VirtualBox.

Installing VirtualBox

The first step to installing VirtualBox is typing this line, which downloads and installs the oracle public key.  This key ensures that all our downloads from this repository are signed and trusted.

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add –

Now type the following:

sudo apt-get update

This updates our software lists, so they are now aware of all the programs available in the new repository (as well as any updates from other repositories).  Once this is done updating, type the following line, which will install VirtualBox 4, along with any dependencies.

sudo apt-get install virtualbox-4.0

The download will progress, and when you’re through, you’ll have a new entry in your System Tools menu.

VirtualBox Menu Entry

Installing the VirtualBox Extension

First, we’ll need to download the VirtualBox Extension Pack, which is located at this link.

Note: this link changes with each version of VirtualBox, so if the current version is not 4.0.4, the link can be found on the VirtualBox downloads page.

Now launch VirtualBox.  When it loads, choose the File menu, then Preferences, like this.

Access VirtualBox Preferences

Now choose the Extensions tab and click the little blue diamond.

Add Extension

Navigate to where you saved the Extensions Pack and select it.

Select The Extension Pack

Confirm that you want to install the Extension Pack; you will also need to accept the Oracle license agreement, then finally enter your administrator password (if asked for it).  The Extension Pack will load, and when the process is finished, you’ll see a confirmation that the installation was a success.

Extension Installed Successfully

Congratulations!  VirtualBox is now ready to be used, and will have full support for USB, remote desktops and more.

Comments [2]

  1. Is this a recent change? As far as I know, out of the box, Virtualbox has no USB support. You need a premium license for it.

  2. The recent change, as of VirtualBox 4, is that there are no longer 2 different versions of Virtualbox (one open source and one… not). If you follow the directions above, you'll first install the new "standard" version, which does NOT include USB support, but will then install the extension pack (released using the VirtualBox Personal Use and Evaluation License), which DOES include support for USB (and other closed-source features).

Leave a Reply

Your email address will not be published. Required fields are marked *