In this post, we will see how to install VirtualBox on Ubuntu and Debian Linux. If you are a newbie, you may have a few questions: What is VirtualBox? What does VirtualBox do? In short, VirtualBox, originally developed by Sun MicroSystems and now owned by Oracle, is a virtualization software that can simulate a standalone computer. Each standalone computer (aka virtual appliance) can run its own operating system (guest OS) and is self-contained (delete the appliance and your host system is back to its original state). The appliances can interact with each other and be a part of your home network and will be treated as a separate system. Because of these features and more, VirtualBox allows you to test various operating systems, without making permanent changes to your host OS. [Read: Install Ubuntu Server 14.04 Trusty Tahr as a home server]
We recently presented some of the best home server operating systems. VirtualBox would allow you to test these operating systems before you select one. Alternatively, you may actually run your server operating system or media server from your VirtualBox instance 24/7: you may not want to mess with your Ubuntu system that is working flawlessly and may choose to run your server from within a VirtualBox appliance without disturbing your host Ubuntu. Or you just want a test system to mess with and learn from. Sounds exciting? How to run your server from VirtualBox is a topic for another post. For now, let us look at how to install VirtualBox on Debian and Ubuntu Linux.
Recommended HTPC / Home Server Builds 2017:
- Best Home Theater PC Build 2017 to do it all (Plex, Kodi, NAS, Gaming)
- Best Emby Server builds 2018 – Pre-built and DIY options
- Medium Budget 4K HTPC Build 2017 for Kodi, Plex and Gaming
- Cheap 4K HTPC Build for Kodi, OpenELEC, and LibreELEC 2017
- Low Power Home Server Build 2017 for Network File and Media Storage
- Best HTPC for Kodi with 4K on a Medium Budget 2017 (~$400)
- Energy efficient budget HTPC-NAS combo build 2016
Before you begin, enable Intel VT-x hardware virtualization in BIOS or UEFI firmware. This is required for VirtualBox to run.
Install VirtualBox on Ubuntu and Debian Linux
Before installing VirtualBox on Ubuntu, a package known as
dkms must be installed. This is needed to make Virtual Box continue to work with any updated kernels in future.
sudo apt-get install dkms
Next, the easiest way to install VirtualBox on Ubuntu is through the official Ubuntu repositories. However, VirtualBox in the Ubuntu repository is always a few minor versions older. For most users, this makes no difference and so the command below should be sufficient.
sudo apt-get install virtualbox
You may skip the rest of the steps. However, if you want the latest version of VirtualBox then you will have to install VirtualBox on Ubuntu from Virtualbox official repository. First, add the repository key using the following command:
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
Next, add the VirtualBox repository using the following command. This post shows how to install VirtualBox on Ubuntu 14.04 LTE. You may have to replace
trusty with the release you are using (see below for instructions):
sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian trusty contrib" >> /etc/apt/sources.list.d/virtualbox.list'
Replace the word
trusty in the above command with the release name corresponding to your release number:
- vivid – 15.04
- utopic – 14.10
- trusty – 14.04 LTE
- saucy – 13.10
- raring – 13.04
- quantal – 12.10
- precise – 12.04 LTE
Next, refresh the packages list using the command below:
sudo apt-get update
Next you will have to find out the package name for the latest version of virtual box. To that run the following command:
sudo apt-cache search virtualbox
From the displayed list (as shown in the picture below), note down the package name for the latest version of virtualbox. Currently, it is
Finally, install VirtualBox on Ubuntu and Debian Linux using the following command:
sudo apt-get install virtualbox-4.3
Once the VirtualBox installation finishes you should be able to find it in your menu.
There you have it, Virtual Machine for Ubuntu and Debian. You may also use this guide to install VBox on Ubuntu Server edition. Using Ubuntu or Debian VirtualBox Extension pack or VirtualBox Guest Additions, you can add several more features to VirtualBox. VMware is another major virtualization software, but VirtualBox has always been my favorite, even-though it has its quirks. Go ahead install VirtualBox on Ubuntu and Debian play with almost any OS.
Complete Guide to Setting Up a Home Server on VirtualBox Virtual Machine:
- Install VirtualBox - Windows 7/8/10 / Ubuntu/Debian
- Install VirtualBox Extension Pack - Linux and Windows Host
- Install Guest OS on Virtual Box - Ubuntu Server
- Install VirtualBox Guest Additions - Windows Guest / Linux Guest
- Update VirtualBox Guest Additions - Windows Guest / Linux Guest
- Setup VirtualBox Shared Folder - Windows and Linux
- Mount VirtualBox Shared Folder - Windows Guest / Ubuntu Guest
- Access USB Drive on VM - Windows and Linux Guest
- Configure Home Server on VirtualBox - Ubuntu Server