Install Virtualbox on Debian and Ubuntu Via Official Repository

Debian and Ubuntu can easily and quickly install the open source Oracle VM Virtualbox from Debian or Ubuntu repository. However, you are not likely to get the latest version of Virtualbox using this installation method. If you like to be on the bleeding edge, then you can install the latest version of Virtualbox on Debian and Ubuntu via Virtualbox official repository. Here’s how.

Install Virtualbox on Debian and Ubuntu

If you have already installed virtualbox from Debian or Ubuntu repository, remove it.

sudo apt-get remove virtualbox

Don’t worry about your guest OS. They will be fine.

Open /etc/apt/sources.list file and add virtualbox official repository.

sudo nano /etc/apt/sources.list

Append this line at the end of the file.

deb wily contrib

Replace wily by your distribution’s codename such as trusty, wheezy, jessie.

Fetch and then register Oracle public key.

wget -q -O- | sudo apt-key add -

The Oracle public key fingerprint is

7B0F AB3A 13B9 0743 5925 D9C9 5442 2A4B 98AB 5139
 Oracle Corporation (VirtualBox archive signing key) <[email protected]>

You can use apt-key to list fingerprint.

apt-key finger

Check the fingerprint and make sure it matches the above fingerprint.

Now update local package index and install virtualbox

sudo apt-get update

sudo apt-get install virtualbox-5.0 dkms

dkms can automatically recompile the Virtualbox host kernel modules (vboxdrv, vboxnetflt and vboxnetadp) when you upgrade Linux kernel to a new version and this is very important for Virtualbox to work properly.

Check Virtualbox version number.

Install Virtualbox on Debian and Ubuntu Via Official Repository

That’s it!


Rate this tutorial
[Total: 5 Average: 4]

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community ( for questions unrelated to this article.
  • If my answer helped you, please consider supporting this site. Thanks :)