Install Prerequisites
Before installing VirtualBox 5.2/6.1, please install these packages below if your systems don’t already have them installed….
sudo apt update sudo apt-get install gcc make linux-headers-$(uname -r) dkms
Add VirtualBox Repository
If you want to always get the latest versions of VirtualBox when they become available, you’ll want to add its software repository to Ubuntu…
Run the commands below to add the repository key to your system…
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 -
After adding the repository key above, run the commands below to add VirtualBox package repository.
sudo add-apt-repository "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib"
After that, run the commands below to update Ubuntu repositories.
Installing VirtualBox
At this point, the Ubuntu system should be ready to install the latest version of VirtualBox. First you may want to remove the previous 6.0 version if you’re still running it… to do that, run the commands below:
sudo apt remove virtualbox virtualbox-6.1
Finally, run the commands below to install the latest 6.1 (major) version of the software. Continue reading “Install Virtualbox 5.2/6.1 on Ubuntu 16 headless mode” »