When you install VirtualBox using apt-get, you install the latest and greatest version, right? Not necessarily. What you really wind up installing is the version that is associated with your apt-get sources. This is by design, and with reasonably good reason. This week, I will go over the steps needed to install THE latest and greatest version of VirtualBox, right from them.

The version of VitualBox that was included in my repositories is version 4.xxx And for the most part, there is no problem with this. Typically, when a Linux distro comes out with their own set of respositories, it is because of compatability issues. The versions of software included in the sources has typically been vetted in some way or another to ensure there are no compatability issues.

One of the big new features introduced in VirtualBox 5 that I am after is the ability to start a VM in headless mode, from within the GUI. This is a bit of a big deal... Previously, in order to start any VM from within the GUI, you HAD to open the console window along with it. Sometimes this is just fine. But for the most part, most of the VMs I want to set up don't have much for a console anyways. In these events, I have to resort to raw CLI commands to start a VM headless.

Not anymore!

Well, at least not anymore once we get it installed.

So let's get to it!

  1. First, we need to add the VirtualBox repository to our sources list:
    • sudo nano /etc/apt/sources.list
  2. Add:
    • deb http://download.virtualbox.org/virtualbox/debian jessie contrib
    • Note: You may need to replace "jessie" with something else.. What, exactly? That'll depend on your distro. There should be other sources in the file, and they will have an entry as well; just use the existing if you are unsure.
  3. Next, we need to download Oracle's VirtualBox source key, and add it to apt:
    • wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
  4. Update our sources:
    • apt-get update
  5. And finally, install!
    • apt-get install virtualbox-5.0
  6. DONE!

Feel free to let me know what you think in the comments.