How to Install and Setup VirtualBox on Ubuntu 22.04 Desktop

You want to run multiple operating systems, right? VirtualBox is one of the simplest options for you to try on. VirtualBox (fullname is Oracle VM VirtualBox) is a type-2 hypervisor for x86 virtualization developed by Oracle Corporation.

In this tutorial, I will guide you through the steps on how to install it on Ubuntu 22.04 Desktop and setup a virtual machine to install another Ubuntu 22.04 Desktop.

Install VirtualBox

Firstly, as usual, we need to update the system by running command:

sudo apt update; sudo apt dist-upgrade

Now, start install VirtualBox:

sudo apt install virtualbox

During the installation, if your computer has secured boot (UEFI) enabled, the installation process will ask you for secure boot password. Please set one to continue.

Once the VirtualBox installation is completed, you can then run it using the “virtualbox” command:


Or you just use your graphical UI to find the newly installed VirtualBox and click on it.

The vervion of the VirtualBox you get on Ubuntu 22.04 would be 6.1.

Installation troubleshoot

If the installation process ends up with an error message as below, probably when your computer has secured boot (UEFI) enabled:

Failed to start LSB: VirtualBox Linux kernel module

You could solve the problem by following the steps below:

  1. Reboot your computer
  2. Choose Enroll MOK » Continue » Yes » Enter Password (you have set earlier) » Reboot.

Setup VirtualBox on Ubuntu 22.04

Now, the next thing is how to set up VirtualBox on Ubuntu 22.04 to install another operating system (i.e. another Ubuntu 22.04 Desktop).

First, you will need to have an Ubuntu 22.04 Desktop ISO, which can be downloaded from Ubuntu 22.04 Releases.

Second, you will need to install extension packs for VirtualBox as this will enable you to use other Virtualbox functionalities like support for USB, disk encryption, high-resolution graphic and much more


Then use the below command to install the extension packs on your Ubuntu 22.04:

sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-6.1.38.vbox-extpack

Once the installation is completed, you can start using VirtualBox with extended features.

Leave a Reply