Jul 16, 2021 4 min read

How to Install VirtualBox on Ubuntu 20.04

Install VirtualBox on Ubuntu 20.04 with our step-by-step tutorial. It enables you to run multiple operating systems on a single computer.

Install VirtualBox on Ubuntu 20.04
Table of Contents

Choose a different version or distribution


Before we begin talking about how to install VirtualBox on Ubuntu 20.04, let’s briefly understand - What is VirtualBox?

VirtualBox is a powerful software that enables you to run multiple operating systems on a single computer. It acts as a virtualization platform, allowing you to create virtual machines (VMs) to simulate different environments.

Whether you're a developer, tester, or curious user, VirtualBox lets you experiment with various operating systems, applications, and configurations without interfering with your main system. With its user-friendly interface and broad compatibility, VirtualBox is a popular choice for virtualization needs.

In this tutorial, you will install VirtualBox on Ubuntu 20.04. We will also address some of the FAQs related to Virtual Box.

Advantages of Virtual Box

  1. Versatile: VirtualBox allows you to run multiple operating systems on a single computer.
  2. Easy to Use: With its user-friendly interface, VirtualBox simplifies the process of creating and managing virtual machines.
  3. Flexibility: It supports a wide range of operating systems, giving you the freedom to experiment with different software configurations.
  4. Cost-effective: VirtualBox is free and open-source, making it an affordable choice for virtualization needs.
  5. Compatibility: VirtualBox works seamlessly with various hardware and software, ensuring smooth performance across different systems.

Prerequisites to Install VirtualBox on Ubuntu 20.04

In order to complete this tutorial successfully, you need to be logged in as a user with sudo privileges.

Step 1 - Installing VirtualBox from Oracle Repositories

The version of VirtualBox in this tutorial is 6.1, you can find the latest version here. To begin the installation process, follow the blow steps:

1) Start with importing the GPG keys of Oracle VirtualBox repository with the help of the wget command:

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 -

The output for both the commands should be OK confirming that the keys have been successfully imported and the packages will be considered trusted.

2) After that, you need to add the APT repository to your system:

echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | \
     sudo tee -a /etc/apt/sources.list.d/virtualbox.list

The Ubuntu codename will then be printed by $(lsb_release -cs). For instance, the command will print focal for Ubuntu 20.04.

3) Now, update the Apt package list and install VirtualBox 6.1:

sudo apt update
sudo apt install virtualbox-6.1

Step 2 - Installing VirtualBox Extension Pack

There are a number of uses of the VirtualBox Extension Pack such as virtual USB 2.0 and 3.0 devices, support for RDP, images encryption and a lot more.

1) Download the pack using the following command:

wget https://download.virtualbox.org/virtualbox/6.0.0/Oracle_VM_VirtualBox_Extension_Pack-6.0.0.vbox-extpack
Ensure that the version of the Extension Pack matches the VirtualBox version.

2) Then, import the extension pack using the following command:

sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-6.0.0.vbox-extpack

3) You will then be presented with the Oracle license and prompted to accept their terms and conditions.


Do you agree to these license terms and conditions (y/n)?

4) Press y and hit Enter. You should be able to see the following output, once the installation  is complete:

Successfully installed "Oracle VM VirtualBox Extension Pack".

Step 3 - Installing VirtualBox from Ubuntu Repositories

Just run the following command to install VirtualBox from Ubuntu repositories. Make sure you are logged in as a root or a user with sudo privileges:

sudo apt update
sudo apt install virtualbox virtualbox-ext-pack

Step 4 - Starting VirtualBox

There are two ways of starting VirtualBox: Either by typing virtualbox in the command line or by clicking on the VirtualBox icon (Activities -> Oracle VirtualBox).

FAQs to Install VirtualBox on Ubuntu 20.04

Is VirtualBox free to use on Ubuntu 20.04?

Yes, VirtualBox is free and open-source software, which means you can use it on Ubuntu 20.04 without any cost.

Do I need to enable any additional repositories to install VirtualBox on Ubuntu 20.04?

Yes, you need to enable the multiverse repository on Ubuntu 20.04 to install VirtualBox.

Can I run Windows virtual machines on VirtualBox installed on Ubuntu 20.04?

Absolutely! VirtualBox allows you to run various operating systems, including Windows, on your Ubuntu 20.04 system.

Are there any hardware requirements for installing VirtualBox on Ubuntu 20.04?

VirtualBox has modest hardware requirements. As long as your Ubuntu 20.04 system meets the minimum specifications, you should be able to install and use VirtualBox.

How can I manage virtual machines in VirtualBox on Ubuntu 20.04?

After installing VirtualBox, you can use its user-friendly interface, called VirtualBox Manager, to create, configure, and manage virtual machines on Ubuntu 20.04.

Can I install VirtualBox extensions on Ubuntu 20.04?

Yes, you can install VirtualBox extensions on Ubuntu 20.04 to enable additional features, such as USB support and remote desktop connectivity.

Is it possible to install VirtualBox on Ubuntu 20.04 without using the terminal?

Yes, you can install VirtualBox on Ubuntu 20.04 using the graphical software center or package manager, if available.


We hope this detailed tutorial helped you understand how to install VirtualBox on Ubuntu 20.04. To learn more about VirtualBox installation on Ubuntu 20.04, check out the official VirtualBox technical document.

If you have any queries, please leave a comment below, and we’ll be happy to respond to them for sure.

Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to DevOps Tutorials - VegaStack.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.