Install virtualbox 4.1 on any ubuntu version
You need to edit /etc/apt/sources.list
gksudo gedit /etc/apt/sources.list
Add the following line
Add one of the following lines according to your distribution to your /etc/apt/sources.list:
deb http://download.virtualbox.org/virtualbox/debian oneiric contrib
deb http://download.virtualbox.org/virtualbox/debian natty contrib
deb http://download.virtualbox.org/virtualbox/debian maverick contrib non-free
deb http://download.virtualbox.org/virtualbox/debian lucid contrib non-free
deb http://download.virtualbox.org/virtualbox/debian karmic contrib non-free
deb http://download.virtualbox.org/virtualbox/debian hardy contrib non-free
deb http://download.virtualbox.org/virtualbox/debian squeeze contrib non-free
deb http://download.virtualbox.org/virtualbox/debian lenny contrib non-free
Save and exit the file
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
Update source list
sudo apt-get update
Install virtualbox
sudo apt-get install virtualbox-4.1
Note: Ubuntu/Debian users might want to install the dkms package to ensure that the VirtualBox host kernel modules (vboxdrv, vboxnetflt and vboxnetadp) are properly updated if the linux kernel version changes during the next apt-get upgrade. For Debian it is available in Lenny backports and in the normal repository for Squeeze and later. The dkms package can be installed through the Synaptic Package manager or through the following command:
sudo apt-get install dkms
You can use one terminal command:
sudo apt-get -y install virtualbox
When you are asked for the password, type your password. It will not be shown, not even asterisks. The command will take a while, but will finish and get the user@computer~:$
prompt when it is done.
Reboot for good measure(some kernel modules hate insmod
, but it is not important to know what that is)
and then press Alt+F2 and type:
virtualbox
to get Virtualbox open. It will also be in the Unity dash.
Updated:
Since you downloaded the file, just double-click it so it opens in Software Center. It will still need to download dependencies in any case.
Best Answer
Virtualbox is in the official repository.
Just open a terminal and enter:
After installing you should add the user, you want to use VirtualBox with to the vboxusers group by:
If you prefer a more recent version, take a look at Download VirtualBox.