How to install & Configure – Oracle VM VirtualBox in Ubuntu 14.04 – Headless
So today i am gonna show you, how to install virtualbox on Ubuntu 14.04 LTS.
With Virtualbox is it possible to setup virtual machines, you could test one of the latest ubuntu beta distros in a virtual machine without having to format your harddisk or even without reboot. you could also host you website in the virtual machine and then make another virtual machine there is acting like a firewall so you could protect you website from annoying Spam attacks etc.
Step 1. Prepare your system.
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install build-essential dkms unzip -y
Step 2. Installing Virtualbox.
Next we will have to add the virtualbox repositories to our source list (you can find the latest version here)
sudo nano /etc/apt/sources.list
add this to the sources.list :
deb http://download.virtualbox.org/virtualbox/debian trusty contrib
run this command to add the Virtualbox public key.
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
now we should update our package list and install virtualbox
sudo apt-get update && sudo apt-get install VirtualBox-4.3 -y
Step 3. Configure Virtualbox
Now we will have to add our system user to virtualbox, i am gonna use demo as a user and password as password. You should change user and password to your own system user and password.
sudo usermod -aG vboxusers demo
We are gonna check to see if virtualbox kernel module is loaded by typing this
sudo /etc/init.d/vboxdrv status
You should see an output like this:
VirtualBox kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) are loaded.[/stextbox]
If it isn’t loaded you should do that by running this command
sudo /etc/init.d/vboxdrv setup
So you should have virtualbox installed and up and running by now. it can be really complicated to setup virtualmachines in the terminal and i will therefore advise you to install phpvirtualbox to get an interface to manage and setup virtualmachines.