1) Add the repository:
Copy/paste the following line to "/etc/apt/sources.list.d/virtualbox.list":
Code: Select all
deb http://download.virtualbox.org/virtualbox/debian trusty contrib
Code: Select all
$ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
Code: Select all
$ apt-get update
By default, the virtualbox package from Oracle would automatically try to install an X11 server (for GUI).
Since I'm running things on a headless server machine, I want to avoid having graphics running.
For this, I add "--no-install-recommends", so it only installs mandatory dependencies:
Code: Select all
$ apt-get install virtualbox-5.0 --no-install-recommends
That's it.
You're done