Oracle provides official VirtualBox personal package archive (PPA) to install it in Ubuntu 16.04. The PPA is provided from VirtualBox own server, not from Launchpad. This PPA in the time we write this article, has latest VirtualBox version 5.0.18. Here the procedures shown step by step.
1. Add The Repository Address
Perform an editing command:
sudo gedit /etc/apt/sources.listWhen Gedit window interface comes, enter this single line to a new line and save:
deb http://download.virtualbox.org/virtualbox/debian xenial contribNote: change the "xenial" name into your own Ubuntu codename wily for 15.10, vivid for 15.04, utopic for 14.10, trusty for 14.04, and so on, if you want to install VirtualBox in the older version of Ubuntu.
2. Add The Secure Key
Download the Oracle secure key file for Ubuntu apt-secure program here: https://www.virtualbox.org/download/oracle_vbox.asc. The file name you download is oracle_vbox.asc. Place the file in your $HOME directory.
3. Add The Key Into System
Perform the apt-add command:
sudo apt-add orache_vbox.asc
4. Reload The Apt Database
Perform the reload command:
sudo apt-get update
5. Install VirtualBox
For the latest VirtualBox version, version family of 5.0, perform the install command below:
sudo apt-get install virtualbox-5.0For the older VirtualBox version, version family of 4.3, perform the install command below:
sudo apt-get install virtualbox-4.3
Important Note
If you are facing error when performing install command, such as:
Err:1 http://download.virtualbox.org/virtualbox/debian xenial/contrib i386 virtualbox-5.0 i386 5.0.18-106667~Ubuntu~xenial Connection failed [IP: 118.98.93.72 80] E: Failed to fetch http://download.virtualbox.org/virtualbox/debian/pool/contrib/v/virtualbox-5.0/virtualbox-5.0_5.0.18-106667~Ubuntu~xenial_i386.deb Connection failed [IP: 118.98.93.72 80]
Then re-run the install command with --fix-missing option such as
sudo apt-get install virtualbox-5.0 --fix-missing
or
sudo apt-get install virtualbox-4.3 --fix-missing