How To Install Virtualbox on Ubuntu 20.04
Posted on July 7, 2021 (Last modified on March 17, 2025) • 3 min read • 535 wordsIn this tutorial we learn how to install Oracle VirtualBox on Ubuntu 20.04 from Ubuntu repository and Oracle repository.
In this tutorial we learn how to install Virtualbox on Ubuntu 20.04.
Virtualbox is a virtualization for x86 and AMD64/Intel64. Initially created by Innotek which was acquired by SUN Microsystem in 2008. In 2010, SUN Microsystem was acquired by Oracle.
Some features of Virtualbox including:
There are two source of installing Virtualbox on Ubuntu 20.04.
We will learn how to install Virtualbox from each repository above. You just have to follow one of method described below
Before installing Oracle Virtualbox from Ubuntu repository, let’s update our systems’ apt database using the command below.
sudo apt-get update
After updating our systems apt database we can install virtualbox using the command below.
sudo apt install virtualbox virtualbox-ext-pack
Press y
to continue the installation process.
We just finished installing Virtualbox from Ubuntu repository.
In the next section we will learn how to install Virtualbox from Oracle repository.
In this section we learn how to install Virtualbox from Oracle repository.
First, we need to add Virtualbox GPG key. This will be used by apt to verify whether the package we download is a correct package which was created by Virtualbox developers.
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
After adding Virtualbox GPG key, now we will create new file /etc/apt/sources.list.d/virtualbox.list
using the command below.
echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian focal contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list >> /dev/null
GPG key and repository configuration created. Now it’s time to update our apt database / metadata using the command below.
sudo apt-get update
Everything is ready, it’s time to install Virtualbox on Ubuntu 20.04 using the command below.
sudo apt-get install virtualbox
Press y
to continue the installation process.
VirtualBox Extension Pack provides several useful functionalities for guest machines such as virtual USB 2.0 and 3.0, suport for RDP, images encryption and more.
First let’s download the VirtualBox Extension pack file using the command below.
wget https://download.virtualbox.org/virtualbox/6.1.22/Oracle_VM_VirtualBox_Extension_Pack-6.1.22.vbox-extpack
Install VirtualBox Extension Pack using the command below.
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-6.1.22.vbox-extpack
Do you agree to these license terms and conditions (y/n)?
Press y
to continue the installation process
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully installed "Oracle VM VirtualBox Extension Pack".
Oracle VM VirtualBox Extension successfully installed.
To start VirtualBox, you can type virtualbox
from terminal.
Alternatively you can click on VirtualBox icon on Activities -> Virtualbox
To learn more about VirtualBox, you can read VirtualBox Documentation.
In this tutorial we learn how to install VirtualBox from Ubuntu Repository and Oracle Repository.
The VirtualBox version from Oracle Repository should provide you with the latest version of Oracle VirtualBox.
When installing Oracle VirtualBox from Oracle repository, you have to manually install Extension pack by downloading the extension pack and run vboxmanage
command.