Oracle's VirtualBox is one of the prevalent solutions for creating a virtual machine. It's available for all modern operating systems, and it's free. In this guide, we will install VirtualBox in Linux Mint and Ubuntu, both through the software managers and the command line.
We wrote this guide on Linux Mint 17.2 and Ubuntu 15.04. It should work on recent earlier and later versions too.
If you run into any problems, leave us a comment.
- 1 Full Update
- 2 How to Install VirtualBox through the software manager
- 3 How to Install VirtualBox through the command line
- 4 To be continued: How to create a Windows Virtual Machine in VirtualBox
Before we begin to Install VirtualBox, it's always a good idea to make sure the system is up to date.
In both Linux Mint and Ubuntu, we just need to open a terminal with ctrl+alt+T and type:
sudo apt-get update && sudo apt-get dist-upgrade -y
A reminder for the Linux newbies: when typing our password after "sudo", nothing show on the terminal, no dots or stars. We just enter our account's password and press Enter.
How to Install VirtualBox through the software manager
The easiest way to install VirtualBox is through the software manager. For Ubuntu, it is the Software Center. For Linux Mint, it is the Software Manager.
How to Install VirtualBox through the Ubuntu Software Center
In Ubuntu, we click on the Software Center icon and search for VirtualBox.
After clicking install, we need to enter our account's password again.
After that, the installation proceeds by itself, and it will create an icon on the sidebar.
How to Install VirtualBox through the Linux Mint Software Manager
In Linux Mint, we will find the Software Manager in the administration section of the main menu.
This time we need to enter the account's password beforehand.
Searching for VirtualBox will return a bunch of results. We select virtualbox-nonfree.
"Nonfree" doesn't mean that we have to pay for it. It means that it has both open source and closed source code.
After that, we just need to click install.
After the installation, we will find the Oracle VM VirtualBox at the Administration section of the menu.
How to Install VirtualBox through the command line
The command line installation will work on distributions based on Debian, Ubuntu, and Linux Mint.
Here we will show how it works in Linux Mint. First, we open the /etc/apt/sources.list to see which Ubuntu repositories our distribution uses.
If our distribution has the gedit editor, the terminal command is:
sudo gedit /etc/apt/sources.list
Linux Mint 17.1 uses the Trusty Tahr repositories.
Here we will find the proper entries depending on our distribution.
In the example, we add the Debian trusty contrib, and we save the sources.list file.
After that, we download and register the Oracle public key for apt-secure. The command below is in a single line:
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
Finally, to install VirtualBox we enter:
sudo apt-get update && sudo apt-get install virtualbox-4.3 -y
If we don't get any error messages, the installation was successful.