How to Install VirtualBox on Ubuntu

How to Install VirtualBox on Ubuntu

[powerkit_collapsible title=”Not using Ubuntu? Choose a different version or distro.”]
Debian 10/11

Oracle VM VirtualBox is a proprietary, cross-platform virtualization software that let you run multiple guest operating systems on your present operating system (called guest OS), under the same hardware.

VirtualBox is straightforward to use. You need to do a few steps to get a running guest operating system. There are also some advanced virtualization options that expert users can tweak to get the best performance.

This article will show how to install VirtualBox on Ubuntu. There are three methods to install VirtualBox on Ubuntu.

VirtualBox Graphical Installation

We are going to download VirtualBox from its website, so you have to follow a straightforward set of steps. The good thing is you are going to install the latest version in an easy way, but the downside that you have to do these steps every time a new release is out.

Open a browser. Here we’ll be using Firefox.

word image 123

Go to VirtualBox Linux downloads page and click Ubuntu 19.10 / 20.04 / 20.10 / 21.04, but the procedure for other version of Ubuntu is pretty much the same.

word image 125

Click save to save the binary.

word image 126

Go to the download location, right-click virtualbox*.deb, then open with software install.

word image 127

Click install, and pass your password, then press authenticate.

word image 128

Once done, you can open VirtualBox by searching the app name in your applications.

word image 129

word image 130

Installing VirtualBox via the Command-line

VirtualBox is already present in Ubuntu repository, but you will not always find the latest version of VirtualBox.

You need to open a terminal either graphically or by clicking t while holding down Ctrl and Alt keys.

word image 131

Update apt package list and install VirtualBox:

sudo apt update
sudo apt install -y virtualbox

word image 132

Launch VirtualBox either graphically or by executing the next command.

word image 134

Install VirtualBox from Oracle Repositories

Open up a terminal either graphically or by pressing t while holding both Alt and Shift keys.

word image 135

Add the Oracle VirtualBox pgp key to apt using the following command.

wget -qO- | sudo apt-key add -

word image 136

Add VirtualBox to apt package sources list by adding an entry to /etc/apt/sources.list file (this article will use vim; the entry will be added to the end of the file).

Must be opened the file as root, i.e., with sudo:

word image 137

sudo nano /etc/apt/sources.list

Add the next line to the file, save and exit. Since there is no ubuntu page, we will add Debian’s:

deb [arch=amd64] bullseye contrib

word image 138

Now update apt package list by running the next command:

sudo apt update

word image 139

Now install VirtualBox by executing the next command.

word image 140

sudo apt install -y virtualbox

Now you can run VirtualBox either graphically by searching your app menu, or by running the next command:


word image 141


In this article we installed VirtualBox on Ubuntu using the GUI (graphical user interface) method, by installing it from the apt repository, and by installing it from the Oracle repositories. If you have any feedback or questions feel free to leave us a comment.

Notify of
Receive notifications when your comment receives a reply. (Optional)
Your username will link to your website. (Optional)

Inline Feedbacks
View all comments
You May Also Like