This post (Updated 29-04-2018) is about how to install latest Virtualbox VM Software on Ubuntu 18.04 LTS or 17.10 or old Ubuntu 16.04 LTS. If we install Virtualbox on Ubuntu through its Official Repository (PPA), It will update automatically with System and virtualbox will updated with every system update. You can also download Virtualbox through its official website and install it through software center. I suggest you to only install with PPA if you have stable internet connection. Otherwise for offline installation, you can download .deb installer from official website. link are given at end of this post.
Virtualbox is a best virtualization software for Ubuntu and native Linux OS. Through It we can run most of windows software on VM. We can also run some windows 10 APPS and games through VM, Even we can run Android with its APPS.
Install Virtualbox 5.2 on Ubuntu-
Step 1: Before installing the new version , we need to remove the older using the software center or use the below command- (Optional)
sudo apt-get remove virtualbox virtualbox-4.* virtualbox-5.0
Step 2: Add the Packages list to sources.list-
sh -c "echo 'deb http://download.virtualbox.org/virtualbox/debian '$(lsb_release -cs)' contrib non-free' > /etc/apt/sources.list.d/virtualbox.list"
Note : If you want to add virtualbox PPA to LinuxMint and elementary OS users have to replace the name manually in place of $(lsb_release -cs).
Step 3: Download and install the Key for Virtualbox-
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
Step 4: Update the Repository-
sudo apt-get update
Note: You may get some error like in Ubuntu 18.04 LTS, it may fix in future. But for now ignore this error.
N: Skipping acquire of configured file ‘contrib/binary-i386/Packages’ as repository ‘http://download.virtualbox.org/virtualbox/debian bionic InRelease’ doesn’t support architecture ‘i386’
N: Skipping acquire of configured file ‘non-free/binary-i386/Packages’ as repository ‘http://download.virtualbox.org/virtualbox/debian bionic InRelease’ doesn’t support architecture ‘i386’
Step 5: Install Virtualbox 5.2 (Or any latest 5.2+ version)-
sudo apt-get install virtualbox-5.2
Note: If new version arrive in future, You only need to replace step 5 to sudo apt-get install virtualbox-[version_number] Ex- sudo apt-get install virtualbox-5.3
If you want to verify The key fingerprint for oracle_vbox.asc & oracle_vbox_2016.asc, please follow virtualbox official website. You might want to compare the SHA256 checksum or the MD5 checksum to verify the integrity of downloaded packages. The SHA256 checksums should be favored as the MD5 algorithm must be treated as insecure!
If you need any help regarding Ubuntu/Virtualbox, Please comment below.