How to Install VirtualBox on Ubuntu/Debian-based Linux distributions
Posted: Tue Mar 20, 2018 3:01 pm
VirtualBox is a free and open source virtualization software that can be used for enterprise as well as home edition. it allows you to create and run guest operating systems (virtual machines) on top of the existing operating system (host). VirtualBox can be installed to run on host operating systems such as Linux-based distributions, Windows, Solaris, OS X, and OpenSolaris.
See our previous post on VirtualBox and Genymotion: install-whatsapp-on-ubuntu-or-other-lin ... utions-580
VirtualBox is released under GPL v2, and Oracle VM VirtualBox extension pack is released under PUEL (Personal Use and Evaluation License). Everytime you install VirtualBox make sure to install the extension pack as well. The pack enables Virtual Remote Desktop Protocol (VRDP) and a lot other enhancements. Always install the extension pack with the same version as your installed version of VirtualBox.
The current version and some older versions of VirtualBox supports 32bit and 64bit host and guest operating systems (to be able to run 64bit guests, make sure your processor supports hardware virtualization and the host operating system is 64bit as well).
You can install VirtualBox by either using precompiled binaries (.deb packages) or from source. This guide focuses on installing the latest version of VirtualBox from the official Oracle repository on Ubuntu 16.04 and Debian 8.
You can install VirtualBox using the .deb binaries, by downloading an appropriate package from https://www.virtualbox.org/wiki/Linux_Downloads for Linux-based distributions or from https://www.virtualbox.org/wiki/Downloads for other operating systems, compile it and follow instructions.
As for the time of this post, the latest release of VirtualBox is 5.2.8.
Installing VirtualBox on Ubuntu/Debian-based Linux distributions
If you have an old versions of VirtualBox installed from Ubuntu or Debian repository, open the Terminal (Ctrl+Alt+T) and remove it with:
Next, open /etc/apt/sources.list file:
Ctrl + O to save changes, Ctrl + X to exit.
Or
and append the following line at the end of your /etc/apt/sources.list file:
Depending on your distribution, replace '<mydist>' with 'artful', 'zesty', 'yakkety', 'xenial', 'trusty', 'stretch', 'jessie', or 'wheezy' (older versions of VirtualBox supported different distributions), for example:
Add the following line at the end of the sources file if you are using Ubuntu 16.04:
Add the following line at the end of the sources file if you are using Debian 8 Jessie:
Save and close the file. Now fetch the Oracle GPG public key for apt-secure and import it to your Ubuntu 16.04/Debian 8 system (check GPG public key for older distributions) so packages downloaded from Oracle repository can be verified as trusted. You can add these keys for Ubuntu Xenial (and later) and Debian 8 Jessie, respectively, with the commands:
or by combined downloading and registering:
Verify that the key fingerprint for oracle_vbox_2016.asc is
and the key fingerprint for oracle_vbox.asc is
Update the local package index:
and next install VirtualBox 5.2.x:
Install dkms packages - this ensure that the VirtualBox host modules are correctly updated if the kernel version changes during the next upgrade.
For Xenial 16.04 and higher, you can also get the extension pack from the Canonical repositories. Go to the terminal and execute:
Therefore, for Xenial 16.04 and later distributions, you can get VirtualBox and the extension pack by typing the following:
and following the instructions on your screen.
Finally, launch the VirtualBox by starting
OR by typing in the Unity Dash:
See our previous post on VirtualBox and Genymotion: install-whatsapp-on-ubuntu-or-other-lin ... utions-580
VirtualBox is released under GPL v2, and Oracle VM VirtualBox extension pack is released under PUEL (Personal Use and Evaluation License). Everytime you install VirtualBox make sure to install the extension pack as well. The pack enables Virtual Remote Desktop Protocol (VRDP) and a lot other enhancements. Always install the extension pack with the same version as your installed version of VirtualBox.
The current version and some older versions of VirtualBox supports 32bit and 64bit host and guest operating systems (to be able to run 64bit guests, make sure your processor supports hardware virtualization and the host operating system is 64bit as well).
You can install VirtualBox by either using precompiled binaries (.deb packages) or from source. This guide focuses on installing the latest version of VirtualBox from the official Oracle repository on Ubuntu 16.04 and Debian 8.
You can install VirtualBox using the .deb binaries, by downloading an appropriate package from https://www.virtualbox.org/wiki/Linux_Downloads for Linux-based distributions or from https://www.virtualbox.org/wiki/Downloads for other operating systems, compile it and follow instructions.
As for the time of this post, the latest release of VirtualBox is 5.2.8.
Installing VirtualBox on Ubuntu/Debian-based Linux distributions
If you have an old versions of VirtualBox installed from Ubuntu or Debian repository, open the Terminal (Ctrl+Alt+T) and remove it with:
Code: Select all
sudo apt-get remove virtualbox
Code: Select all
sudo nano /etc/apt/sources.list
Ctrl + O to save changes, Ctrl + X to exit.
Or
Code: Select all
gksudo gedit /etc/apt/sources.list
Code: Select all
deb https://download.virtualbox.org/virtualbox/debian <mydist> contrib
Add the following line at the end of the sources file if you are using Ubuntu 16.04:
Code: Select all
deb http://download.virtualbox.org/virtualbox/debian xenial contrib
Code: Select all
deb http://download.virtualbox.org/virtualbox/debian jessie contrib
Code: Select all
sudo apt-key add oracle_vbox_2016.asc
sudo apt-key add oracle_vbox.asc
Code: Select all
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
Verify that the key fingerprint for oracle_vbox_2016.asc is
Code: Select all
B9F8 D658 297A F3EF C18D 5CDF A2F6 83C5 2980 AECF
Oracle Corporation (VirtualBox archive signing key) <info@virtualbox.org>
Code: Select all
7B0F AB3A 13B9 0743 5925 D9C9 5442 2A4B 98AB 5139
Oracle Corporation (VirtualBox archive signing key) <info@virtualbox.org>
Code: Select all
sudo apt-get update
Code: Select all
sudo apt-get install virtualbox-5.2
Code: Select all
sudo apt-get install dkms
Code: Select all
sudo apt install virtualbox-ext-pack
Code: Select all
sudo apt install virtualbox virtualbox-ext-pack
Finally, launch the VirtualBox by starting
Code: Select all
VirtualBox (Dash >> Search >> Oracle VM VirtualBox)
Code: Select all
virtualbox