This post shows students and new users the steps to install and configure Oracle VirtualBox on Ubuntu Linux. VirtualBox is an open source cross-platform virtualization software that allows you to run multiple guest machines (virtual machines) simultaneously on a single host computer.
VirtualBox is generally used in test environments. In some development environments, a VirtualBox host is used to run multiple operating systems, and these machines are used to test different test scenarios.
With VirtualBox and similar virtualization software, you can use a single machine as a host computer. Then, within the virtualization software, you can create several separate guest machines, each with its own operating system.
Applications that run one on one operating system may not run efficiently on other operating systems, and VirtualBox can be very helpful in this situation to ensure that an application is tested to run anywhere on any operating system.
For more information on VirtualBox, see its Homepage.
The VirtualBox software packages are available in the Ubuntu multiverse repository. However, the packages it contains may not be the latest versions.
To install or update to the latest VirtualBox software on Ubuntu, add your repository to Ubuntu so you can always get the latest version when it is available.
How to add the VirtualBox repository to Ubuntu
If you want to always get the latest versions of VirtualBox when they are available, you will want to add your software repository to Ubuntu.
Run the following commands to import and add the key from the Oracle public key repository to your system.
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add - wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
After importing the above repository key, run the following commands to add the VirtualBox package repository file on Ubuntu Linux.
sudo add-apt-repository "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib"
Once this is done, you are ready to install Oracle VirtualBox on Ubuntu Linux.
How to install Oracle VirtualBox on Ubuntu
At this point, Ubuntu Linux should be ready to install the latest version of VirtualBox. At the time of writing, the latest version of VirtualBox is on 6.1.x.
Future versions may have a different version number. So go to the link below to find out what the latest new version is when it becomes available.
If the current version is still on 6.1.x, then run the following commands. If a newer version is available, just replace the 6.1 version in below command with latest version.
sudo apt update sudo apt install virtualbox-6.1
After installation, go for lunch on the app by going to the Activity panel and looking for VirtualBox, then select it and open it.