How to install virtualbox on ubuntu 14.04?

Virtualbox is available from the Ubuntu repository. You can install it from the Ubuntu Software Center or using the terminal by running sudo apt-get install virtualbox

If you need the Oracle maintained VirtualBox run this in the Terminal:

sudo sh -c "echo 'deb http://download.virtualbox.org/virtualbox/debian 
'$(lsb_release -cs)' contrib non-free' > /etc/apt/sources.list.d/virtualbox.list" && 
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-
key add - && sudo apt-get update && sudo apt-get install virtualbox-4.3 dkms

Virtualbox can be installed by simple

sudo apt-get install virtualbox

But before running this command you should sync canonical by software updater on Other option.