How to install VirtualBox? [duplicate]

I am new to Ubuntu and I want to install VirtualBox in Ubuntu through terminal. Can you guys please provide me the command to install it?


Solution 1:

Virtualbox is in the official repository.

Just open a terminal and enter:

sudo apt-get install virtualbox

After installing you should add the user, you want to use VirtualBox with to the vboxusers group by:

sudo adduser $USER vboxusers 

If you prefer a more recent version, take a look at Download VirtualBox.