How to Install VirtualBox 7 on Ubuntu 22.04 in a Few Easy Steps

This guide will walk you through the steps to install VirtualBox 7, a full virtualizer app, on Ubuntu 22.04 LTS 'Jammy Jellyfish.'

VirtualBox is a free and open-source virtualization software commonly used at the desktop level to create a test environment. It enables you to create and run virtual machines, which are guest operating systems, including Windows, Linux, Unix, and Solaris.

VirtualBox is available for installation in the Ubuntu 22.04 repositories, but the version is 6.1.38. However, VirtualBox 7 was recently released, and it offers significant advantages over its predecessor, such as:

  • Full virtual machine encryption support
  • Support for UEFI SecureBoot and TPM 1.2/2.0
  • Enhanced 3D support
  • Automated virtual machine builder
  • Integration with Oracle Cloud Infrastructure (OCI)

Fortunately, there is an effortless way to install VirtualBox 7 on Ubuntu 22.04 LTS, which we will show you in this guide. In addition, it is also compatible with Ubuntu versions 18.04, 18.10, 19.04, and 20.04.

1. Import VirtualBox’s Repo GPG Key

VirtualBox 7, as previously stated, is not available in the Ubuntu 22.04 repositories. So, we’ll add it to our Ubuntu 22.04 Linux system.

First, import the Oracle VirtualBox GPG keys that sign the software.

wget -O- | sudo gpg --dearmor --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg

We can now proceed to import the official VirtualBox repository.

2. Add VirtualBox Repo to Ubuntu 22.04

After importing the GPG keys, we’ll add the official VirtualBox repository to our Ubuntu 22.04 system. This implies that the update package will be made available with the rest of your system’s regular updates if a new version is released.

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
Add VirtualBox repo in Ubuntu 22.04

Next, we’ll update the package list.

3. Run System Update

Before we proceed with VirtualBox installation on our Ubuntu 22.04 system, we should update the list of available packages. So, run the below command to update the APT repositories index.

sudo apt update
Updating APT packages list

As you can see, our new VirtualBox repository is now available and ready to be used.

4. Install VirtualBox 7 on Ubuntu 22.04

Everything is already prepared for the actual installation. Now, to install VirtualBox on Ubuntu 22.04, run the following commands:

sudo apt install virtualbox-7.0

When prompted, type “Y” to confirm that you want to install it and press Enter.

Install VirtualBox 7 on Ubuntu 22.04 LTS

Wait for the installation to complete. The VirtualBox is now installed and ready to be used on your Ubuntu 22.04 Linux system.

5. Install VirtualBox Extension Pack

This is an optional step, but I strongly encourage it because it will make working with VirtualBox on your Ubuntu system easier and more convenient. VirtualBox Extension Pack unlocks many great features, such as:

  • Oracle Cloud Infrastructure (OCI) integration
  • VirtualBox Remote Desktop Protocol (VRDP)
  • Host webcam passthrough
  • Disk and full VM encryption

We should highlight one peculiarity here. The installed VirtualBox Extension Pack’s version is highly recommended to match the version of VirtualBox installed on your Ubuntu 22.04 system.

So, to verify the exact version of the installed locally VirtualBox, you can use vboxmanage, a build-in VirtualBox’s command:

vboxmanage -v | cut -dr -f1
vboxmanage checking version

As you can see, the version of Virtualbox installed is 7.0.2. Therefore, you must then download the Extension Pack with the same version.

However, if your VirtualBox installation version is different, replace both places containing 7.0.2 in the command below with the actual version. In addition, you can also go straight to the downloads page and look at the available versions.


Next, to install the VirtualBox Extension pack, run the vboxmanage command as follows:

sudo vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-7.0.2.vbox-extpack

You will be prompted to agree the Oracle’s license terms and conditions. So, type “y” to confirm and press Enter.

Installing VirtualBox Extension Pack

You can verify installed VirtualBox’s extension pack version by running the following:

vboxmanage list extpacks
List installed VirtualBox Extension Packs

6. Add User to vboxusers Group

Before using VirtualBox, you should add your user account to the vboxusers group. This is quick and simple to accomplish by running:

sudo usermod -a -G vboxusers $USER

Now perform a reboot. After login, check that you are in the vboxusers group with this command:

groups $USER
Add user to vboxusers group

7. Running VirtualBox on Ubuntu 22.04

You can start using VirtualBox by launching it from the Ubuntu Dash menu.

Running VirtualBox on Ubuntu 22.04
VirtualBox 7 running on Ubuntu 22.04 LTS (Jammy Jellyfish)


That concludes our guide on installing VirtualBox on Ubuntu 22.04 LTS ‘Jammy Jellyfish.’ We hope you find this guide useful. Thanks for your time!

We recommend checking the official documentation for individuals who want to learn more about the features offered by VirtualBox and how to use them effectively.

However, if you decide to use the other widely popular and used virtualization solution, VMware Workstation Player, our guide on installing it on Ubuntu 22.04 will come in handy.

Finally, you can use VirtualBox in an entirely headless mode to turn your server into a virtualization environment. To learn more about utilizing this VirtualBox feature, check out our guide: “How to Setup and Manage VirtualBox VMs on a Headless Server.”

Thanks for using this tutorial. Your feedback and comments are most welcome.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%


    • Other than the host-side drivers not being present for VirtualBox 7.0 in any repo, yes. You can just run `sudo apt install virtualbox-7.0` and it will uninstall the 6.1 version and install the 7.0 version. You just have to reboot the system after it’s done.

      Be aware however that VirtualBox 7.0 is not actually supported on Ubuntu 22.04 yet. The `virtualbox-extpack` is still only for 6.1, though can be manually installed from the Oracle download site instead, but the required `virtualbox-dkms` has no 7.0 version and no work around.

  1. This is missing the required step of installing the host-side VirtualBox drivers, which are required to be able to attach USB devices to the VMs. The best way is usually to install `virtualbox-dkms`, but there are no host-side drivers for VirtualBox 7.0. The latest available is for 6.1.

  2. Please remove my previous reply – I’d not realised I was trying to install on an Arm64 architecture machine… Need new glasses!

  3. Great article, really clear steps. Unfortunately I got an error relating to three drivers that failed to install and so the vbox kernel module could not start due to a ‘vboxdrv’ issue. Any Ideas?

Leave a Reply

Your email address will not be published. Required fields are marked *