How to install VirtualBox on Ubuntu in 3 minutes

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 -
echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian $(lsb_release -c -s) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
sudo apt -y update
sudo apt -y install virtualbox-6.1
sudo usermod -a -G vboxusers $USER

If needed, you can download the extension pack from Oracle here.