How to Install VirtualBox on Ubuntu 22.04

Oracle VirtualBox is a virtual machine software application designed to run a complete x86_64 compatible operating system within a hosting application running on Windows, macOS, Linux, and Solaris operating systems.

It’s the most common virtualization application after VMware.

In this article, you will learn how to install VirtualBox on Ubuntu 22.04, and later, we will also share with you the steps to install your first virtual operating system on VirtualBox.

Method to Install VirtualBox on Ubuntu 22.04

There are several ways through which you can install VirtualBox on Ubuntu 22.04 or any other Debian-based distribution. You just need to have sudo privileges to install the application on your system.

And we will go through the following methods to install VirtualBox on Ubuntu.

  • The simplest and easiest way to install VirtualBox is to download it from the Software Center [GUI & CLI].
  • Download and install the VirtualBox binary from the Oracle website.

GUI: Install VirtualBox from the Ubuntu Software Center

This step is pretty simple. You just need to open Software Center and install VirtualBox, but the downside of this method is that you won’t get the latest version. If you are fine with a slightly older version, then you can follow the below procedure.

Step 1: Press the “Super key” and search for “Software Center”.

Search for Software Center
Search for Software Center

Step 2: Once you get inside the Software Center, you will find a magnifying glass on the top left side of your screen, so please click on it and search for “Virtual Box”, then click on the search result.

Search Virtual Box in Software Center
Search VirtualBox in Software Center

Step 3: On the right side of the corner, you will find the install button. Click on it to start the installation process, and once you click on that button, you will be prompted to authenticate yourself as a sudo user.

Step 4: Once the application is installed, you can run VirtualBox from here itself, and later, whenever you want to run VirtualBox, press “Super key” and search for “Virtual Box”.

Pretty simple, right?

CLI: Install Virtual Box using the command line in Ubuntu

Alternatively, you can use the command line to install VirtualBox on Ubuntu or any Debian-based distribution. To install VirtualBox, run the below code on your terminal screen:

$ sudo apt install virtualbox

Additionally, you can also install VirtualBox extensions to support USB drives, webcams, and remote control access. To add this extra capability, copy-paste the code below into your terminal window:

$ sudo apt install virtualbox-ext-pack -y

Install VirtualBox from .deb binary package

This option is also pretty simple. You just need to download a package from the Oracle website and install it from the Software Center, or else you can use the command line to install VirtualBox.

It will be just a few extra steps, but it is all worth doing because you will have the latest version of VirtualBox. The only catch is that you need to manually look for the latest release.

To start the procedure, you need to first download the VirtualBox binary package as per your Ubuntu or Debian version.

You can click on the below button to be redirected to the Oracle website.

Once the page is loaded, select the binary file as per your distribution from the list of binary files. I am following these steps on Ubuntu 22.04, so I will choose Ubuntu 22.04.

Download VirtualBox from Oracle Websites
Select Binary package as per your distributions

If you are using Linux Mint or Pop!_OS but you can’t find which VirtualBox file you need to download, just execute the below code, which will solve your concern by displaying the version.

$ cat /etc/os-release | grep VERSION

After the file is downloaded, you can install VBox by running the following command on your Linux terminal: First, open your terminal and change the path where the file is located, and then execute the below code.

$ sudo apt install ./virtualbox-6.1_6.1.34-150636.1_Ubuntu_jammy_amd64.deb 
Install VirtualBox using Binary package in Ubuntu
Install VirtualBox using .deb binary package in Ubuntu

Once the VirtualBox installation is completed, install the VirtualBox tool for extra support.

$ sudo apt install virtualbox-ext-pack -y

And that’s all.

You can now access VirtualBox from your AppManager by invoking “VirtualBox”.

How to Uninstall VirtualBox from Ubuntu

You can easily uninstall VirtualBox from your Ubuntu machine no matter whether you have installed the application from the Software Center or installed it from a binary package.

You just need to invoke the below command, which will remove VirtualBox along with other relevant files.

$ sudo apt remove virtualbox virtualbox-*

But if you prefer to uninstall applications from the Software Center, then you need to open the “Software Center” and uninstall VirtualBox from the “Installed” list.

Wrap up

That’s all it takes to install and uninstall VirtualBox on Ubuntu or any other Debian distribution, and after completing the installation, be sure to learn how to install the OS in VirtualBox for the first time.

If you are facing any issues while installing, do let me know in the comments. We will be happy to fix it up.

Leave a Reply