Installing VirtualBox on Ubuntu

View more Tutorials:

1- Install VirtualBox with command

On  Ubuntu operating system, install the  VirtualBox with cammands rather simply. Now, I will guide you for installing the VirtualBox with the latest version. Consider access to the VirtualBox homepage, which will help you know the latest version number of the VirtualBox:
First of all, update the system:
sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove
OK, at the moment, your system has been updated. Next, you need to install necessary  "Linux Ubuntu headers" for the system.

sudo apt-get -y install gcc make linux-headers-$(uname -r) dkms
Download and add the key of the  VirtualBox to your system, which helps you to be able to access the  VirtualBox Repository on the Internet.
wget -q -O- | sudo apt-key add -

wget -q -O- | sudo apt-key add -
Next, add the  VirtualBox Repository to your system:

sudo sh -c 'echo "deb $(lsb_release -sc) contrib" >> /etc/apt/sources.list'

And now, you can install the  VirtualBox with the latest version.
sudo apt-get update

sudo apt-get install virtualbox-5.2
The result after finishing the installation:

2- Uninstall VirtualBox

If you has installed many  VirtualBox versions on  Ubuntu, and want to uninstall all of them, you need to execute the following command:
sudo apt-get remove virtualbox* --purge
In case, you want to uninstall a specific version of the  VirtualBox, let's implement the similar command as follows:
sudo apt remove virtualbox virtualbox-5.0

sudo apt remove virtualbox virtualbox-4.*

3- Install tools for the VirtualBox

View more Tutorials: