Install VirtualBox 6.1 on Ubuntu 18.04
First you need to add VirtualBox repository
sudo echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian bionic contrib" > /etc/apt/sources.list.d/virtualbox.list
Add Keys
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 -
Do an apt upgrade
sudo apt-get update
If you have older version of VirtualBox installed, remove it
sudo apt remove virtualbox virtualbox-dkms virtualbox-qt
Install VirtualBox 6.1 with
sudo apt-get install virtualbox-6.1
If you use Vagrant, you may need to install latest version as the vagrant provided by ubuntu won’t work with VirtualBox 6.1