In this article, we will have explained the necessary steps to install VirtualBox on Ubuntu 18.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with
sudo privileges. All the commands in this tutorial should be run as a non-root user.
VirtualBox is a free and open-source, cross-platform, software for creating, running, and managing virtual machines on your system. Oracle VM VirtualBox lets you create one or more VMs on a single physical server. Virtual Machines are computers that use the hardware components of the host computer, each running its own operating system. VB supports the installation of MS Windows, Linux, BDS, and MS-DOS on the installed VMs.
- Operating System with Ubuntu 18.04
- Server IPv4 Address with Superuser Privileges (Root Access)
- Gnome Terminal for Linux Desktop
- PuTTy SSH client for Windows or macOS
- Powershell for Windows 10/11
- Familiar with APT Commands
Install VirtualBox on Ubuntu
Step 1. First, before you start installing any package on your Ubuntu server, we always recommend making sure that all system packages are updated.
sudo apt update sudo apt upgrade
Step 2. Installing VirtualBox on Ubuntu.
- Install VirtualBox from Ubuntu repositories:
sudo apt update sudo apt install virtualbox virtualbox-ext-pack
- Installing VirtualBox from Oracle repositories:
First, import the GPG keys of the Oracle VirtualBox repository to your system using the following wget commands:
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
Next, add the VirtualBox repository with the add-apt-repository command:
sudo add-apt-repository "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib"
Once the VirtualBox repository is enabled, update the apt package list and install the latest version of VirtualBox:
sudo apt update sudo apt install virtualbox-6.0
- Install VirtualBox extension on Ubuntu:
For additional features, you may wish to install the Virtualbox extension. To do so execute the below command:
sudo apt install virtualbox-ext-pack
Step 3. Starting VirtualBox.
Now that VirtualBox is installed on your Ubuntu system you can start it either from the command line by typing VirtualBox or by clicking on the VirtualBox icon (Activities -> Oracle VM VirtualBox).
That’s all you need to do to install VirtualBox on Ubuntu 18.04. I hope you find this quick tip helpful. If you have questions or suggestions, feel free to leave a comment below.