Commandline installation instructions
This sould be done once, then you should use Help > Check for updates – VirtualBox updates itself using built in network operations manager and does it pretty well.
First change to root by sudo su.
$ sudo su
Change to directory /usr/src and download the latest (or desired) version of VirtualBox. You will find them on Oracle’s VBox website for Linux downloads.
# cd /usr/src
# wget http://download.virtualbox.org/virtualbox/4.2.6/virtualbox-4.2_4.2.6-82870~Ubuntu~precise_amd64.deb
Then install some required packages.
# apt-get install libgl1-mesa-glx libxmu6 libxt6
Install .deb package using dpkg.
# dpkg -i virtualbox-4.2_4.2.6-82870~Ubuntu~precise_amd64.deb
Download and install Oracle public key.
# wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
# apt-get update
On Ubuntu 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
.
# apt-get install dkms
To download Extension Pack.
# wget http://download.virtualbox.org/virtualbox/4.2.6/Oracle_VM_VirtualBox_Extension_Pack-4.2.6-82870.vbox-extpack
# VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.2.6-82870.vbox-extpack
Add your user to vboxusers user group, change mike to your username
$ sudo usermod -a -G vboxusers mike
GUI installation
If you have access to GUI, not everything must be done from commandline.
Download .deb and Extension Pack file from Oracle’s VirtualBox downloads page, doubleclick on .deb file, by default Ubuntu Software Center will be open, click Install button, after isntallation, doubleclick on Extension Pack file and install.
Now open terminal window (Ctrl + T) and insert:
$ sudo apt-get install build-essential
$ sudo apt-get install dkms
$ sudo /etc/init.d/vboxdrv setup
$ sudo usermod -a -G vboxusers mike
Change mike to your username, adding your user to vboxusers group enables use of USB for example.