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.
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:
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.
You’ll be taken back to the Terminal, where we will now install 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.
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.
Now choose the Extensions tab and click the little blue diamond.
Navigate to where you saved the Extensions Pack and select it.
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.
Congratulations! VirtualBox is now ready to be used, and will have full support for USB, remote desktops and more.