How to Install VirtualBox 7 on Ubuntu 22.04

In this guide, we will cover how to install VirtualBox 7 on Ubuntu 22.04 system step by step.

VirtualBox is a free and open-source virtualization tool for desktop and servers. It allows the users to run multiple virtual machines of different operating system at the same time. It is a type 2 hypervisor for x86 virtualization.

Some of basic terminology used in Virtualization world are:

  • Host Operating System (Host OS) – It is an operating system of the physical machine on which VirtualBox is installed or will be installed. Host OS for virtual box can be Windows, UNIX and Mac OS X.
  • Guest operating system (Guest OS) – It is an operating system which is running inside the virtual machine.
  • Virtual machine (VM) – This is the special environment that VirtualBox creates for our Guest OS while it is running. In other words, we can say that we run guest OS in a VM.


  • Pre Installed Ubuntu 22.04
  • Sudo user with admin privileges
  • 4GB RAM or more
  • Multi Core Processor ( 4 Core CPUs or more)

Without any further delay, let’s deep dive into VirtualBox installation steps.

1) Update System Package Cache

To make the system package cache up to date, run

$ sudo apt update

2) Add VirtualBox 7 Repository

VirtualBox 7 is not available in the default package repositories of Ubuntu 22.04. So, let’s first import virtualbox package repositories keys, run following commands,

$ sudo apt install curl wget gnupg2 lsb-release -y
$ curl -fsSL|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/vbox.gpg
$ curl -fsSL|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/oracle_vbox.gpg

Now, run following echo and tee command to add repository,

$ echo "deb [arch=amd64] $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list

3) Install VirtualBox 7 on Ubuntu 22.04

Run the following apt command to install virtualbox 7 and its dependencies.

$ sudo apt update
$ sudo apt install -y linux-headers-$(uname -r) dkms
$ sudo apt install virtualbox-7.0 -y

4) Add Local User to VBoxusers Group

If you want your local user to use virtualbox with admin privileges then add your local user to vboxusers secondary group.

$ sudo usermod -aG vboxusers $USER
$ newgrp vboxusers

Next, try to start VirtualBox.

5) Start VirtualBox

To start virtualbox GUI, type virtualbox from Activity as shown below,


Click on VirtualBox icon, we will get following window.


Above window confirms that VirtualBox has been started successfully. Before start creating virtual machines inside the virtualbox, let’s first install extension pack in the next step.

6) Install VirtualBox 7 Extension Pack

VirtualBox Extension pack provides additional functionality to virtualbox like support for USB 2.0 & USB 3.0, PXE boot for Intel Cards, disk encryption and VirtualBox RDP.

To Install extension pack, let’s first download its file using beneath wget command.

$ wget

Now, install extension pack, run following command

$ sudo vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-7.0.10.vbox-extpack


You will be prompted to accept the License agreement, press ‘Y’ to accept it.


Above screen confirms that extension has been installed successfully.

Now head back to VirtualBox GUI. From the File menu choose Tools and then click on Extensions Pack Manager


Above screen confirms that extension pack is installed and active. Now, we are ready to create virtual machines inside the VirtualBox.

Note: Please make sure VirtualBox version and extension pack version must match otherwise additional functionality will not work properly.

That’s all from this guide. I hope you have found it informative and useful. Please don’t hesitate to post your queries and feedback in below comments section.

Share Now!

4 thoughts on “How to Install VirtualBox 7 on Ubuntu 22.04”

  1. afer the update
    still 4.3.10 on ubuntu 14.04 LTS

    Candidate: 4.3.10-dfsg-1
    Version table:
    4.3.10-dfsg-1 0
    500 ‘’ trusty/multiverse amd64 Packages

  2. Just installed virtualbox and the extension pack following your instructions, thanks for the guide! Virtualbox is v7.0.8r156879 and the extension pack is v7.0.0r153978. Since there is a version mismatch how can this be corrected so it will work?

  3. Tried using Virtualbox GUI – File / Check for updates and that finds the discrepancy but fails to fix it. Went to Oracle website and downloaded the extension pack (which has the correct matching version). Double-clicked that and it installed okay. All is good, thanks again!


Leave a Comment