In this tutorial, you’ll learn how to install VirtualBox on Ubuntu(14.04,16.04,17.10), Debian(7/8/9).
Make sure your system is up to date, run the commands below to update it.
Ubuntu/Debian
sudo apt-get update
sudo apt-get upgrade
After updating your system, you need to add virtualbox repository to your system.
Ubuntu/Debian
sudo bash -c 'echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" > /etc/apt/sources.list.d/virtualbox.list'
Next, you need to import oracle virtual box keys to your system, import keys via commands below.
Ubuntu 14.04
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
Ubuntu 16.04 / newer
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
Ubuntu/Debian
sudo apt-get update
sudo apt-get install virtualbox-5.2
Add vboxusers group to your username
sudo usermod -a -G vboxusers $USER
That’s it! Now you can launch VirtualBox via dashboard menu, or via terminal via the command below.
virtualbox