How to Install VirtualBox on Linux Mint 22 and 21

Last updated Wednesday, April 22, 2026 11:30 am Joshua James 8 min read 6 comments

Linux Mint still gives you two real ways to install VirtualBox: the version in Mint’s own repositories, or Oracle’s newer upstream branch. If you are searching for a VirtualBox download for Linux Mint, the cleanest path is a managed APT install instead of chasing a one-off .deb file.

You can install VirtualBox on Linux Mint 22.x, including 22.3 and 22.2, and on Linux Mint 21.x with either method. Mint’s repositories keep the setup simple, while Oracle’s repository moves you to the current 7.2.8 series and keeps updates in APT.

Install VirtualBox on Linux Mint

Both installation paths work on supported Mint releases, but they land on different VirtualBox branches. The Linux Mint package is the better default when you want the least maintenance, while Oracle’s repository is the better fit when you specifically want Oracle’s newer upstream build.

MethodLinux Mint 22.xLinux Mint 21.xBest For
Linux Mint repositories7.0.16.x6.1.50.xSimplest setup, no extra repository to maintain
Oracle repository7.2.8.x7.2.8.xNewer upstream branch and Oracle’s current package stream

Oracle also publishes direct Ubuntu .deb downloads on the VirtualBox Linux downloads page, but the repository path is easier to maintain on Linux Mint because updates stay in your normal APT workflow.

Install VirtualBox from Linux Mint repositories

This method stays inside the repositories Linux Mint already uses, so it is the simplest option for most desktop systems.

Update Linux Mint before installing VirtualBox

Refresh package metadata and apply pending updates before building VirtualBox kernel modules.

sudo apt update && sudo apt upgrade -y

These commands use sudo for system changes. If your account is not allowed to run administrative commands yet, follow the guide on how to create and add users to sudoers on Linux Mint before continuing.

The -y flag accepts the upgrade prompt automatically so APT can finish without waiting for a second confirmation.

Install the Linux Mint VirtualBox package on Linux Mint

Mint 22.x currently installs the 7.0.16 series, while Mint 21.x installs the older 6.1.50 series. Install matching kernel headers at the same time so the VirtualBox modules build against the kernel you are running right now.

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

The $(uname -r) expansion inserts your running kernel version so APT pulls the matching headers instead of a generic package.

Verify the Linux Mint VirtualBox package on Linux Mint

The distro-packaged method does not create vboxdrv.service on Mint 22.x or 21.x, so verify the installed package revision and loaded modules directly.

dpkg-query -W virtualbox

Expected output on Mint 22.x looks like this:

virtualbox      7.0.16-dfsg-2ubuntu1.3

Mint 21.x reports the 6.1.50 package revision instead.

lsmod | grep -E '^vboxdrv|^vboxnetflt|^vboxnetadp'

Relevant output includes:

vboxnetadp             28672  0
vboxnetflt             36864  0
vboxdrv               696320  2 vboxnetadp,vboxnetflt

The module sizes can differ between Mint 22.x and 21.x, but the same three module names should appear when the install is healthy.

Add your account to the VirtualBox vboxusers group on Linux Mint

VirtualBox needs the vboxusers group for USB device access and some host integration features.

sudo usermod -aG vboxusers "$USER"

The -aG option appends vboxusers to your supplementary groups. Without -a, usermod can replace your existing secondary groups instead of adding one more.

Sign out and back in so the new group applies to a fresh login session, then confirm that vboxusers appears for your account.

groups "$USER"

Expected output includes vboxusers somewhere in the group list:

username : username adm cdrom sudo dip plugdev lpadmin sambashare vboxusers

Install VirtualBox from Oracle’s official repository

Use Oracle’s repository if you want the newer 7.2 branch or you prefer Oracle’s own package stream instead of the older Mint-packaged branches.

Oracle’s DEB822 source file uses Ubuntu codenames instead of Mint’s own release names, so pick the matching suite before you copy the repository block.

Linux Mint releaseMint codenameUbuntu baseUse this suite
Linux Mint 22.xWilma, Xia, Zara, ZenaUbuntu 24.04 LTSnoble
Linux Mint 21.xVanessa, Vera, Victoria, VirginiaUbuntu 22.04 LTSjammy

Install the Oracle repository tools for VirtualBox on Linux Mint

Oracle’s repo method needs curl, ca-certificates, and gpg so Mint can fetch and trust the signing key.

sudo apt update && sudo apt install curl ca-certificates gpg -y

If you do not usually work with curl, the curl command in Linux guide explains the -fsSL flags in more detail.

Import Oracle’s signing key for VirtualBox on Linux Mint

Store Oracle’s signing key in /usr/share/keyrings/ so APT can verify the repository without using the deprecated apt-key workflow.

curl -fsSL https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --dearmor --yes -o /usr/share/keyrings/virtualbox.gpg

The --yes flag lets the command overwrite the keyring cleanly if you rerun it later.

Linux Mint uses Ubuntu package bases here, so use noble on Mint 22.x and jammy on Mint 21.x. Do not substitute the Mint codenames in this source file.

Add the Oracle VirtualBox repository on Linux Mint 22.x

Mint 22.x is based on Ubuntu 24.04, so the Oracle source file needs the noble suite.

printf '%s\n' 'Types: deb' 'URIs: https://download.virtualbox.org/virtualbox/debian' 'Suites: noble' 'Components: contrib' 'Signed-By: /usr/share/keyrings/virtualbox.gpg' | sudo tee /etc/apt/sources.list.d/virtualbox.sources > /dev/null

This uses sudo tee because a plain > redirect would try to write the root-owned file from your current shell instead of with elevated privileges.

Add the Oracle VirtualBox repository on Linux Mint 21.x

Mint 21.x is based on Ubuntu 22.04, so the same source file needs the jammy suite instead.

printf '%s\n' 'Types: deb' 'URIs: https://download.virtualbox.org/virtualbox/debian' 'Suites: jammy' 'Components: contrib' 'Signed-By: /usr/share/keyrings/virtualbox.gpg' | sudo tee /etc/apt/sources.list.d/virtualbox.sources > /dev/null

Install Oracle VirtualBox 7.2 on Linux Mint

Refresh APT after writing the source file, confirm Oracle’s fetch lines, then install the current Oracle package.

sudo apt update

Relevant fetch lines include:

Get:1 https://download.virtualbox.org/virtualbox/debian noble InRelease [4,445 B]
Get:2 https://download.virtualbox.org/virtualbox/debian noble/contrib amd64 Packages [2,029 B]

Mint 21.x shows the same two lines with jammy in place of noble.

sudo apt install virtualbox-7.2 -y

On current Oracle builds, the package name is virtualbox-7.2 and it installs the full application in one package.

Verify the Oracle VirtualBox package on Linux Mint

This method uses the package name virtualbox-7.2, it installs vboxdrv.service, and it also adds /sbin/vboxconfig for later module rebuilds.

apt-cache policy virtualbox-7.2

Expected output on Mint 22.x looks like this:

virtualbox-7.2:
  Installed: 7.2.8-173730~Ubuntu~noble
  Candidate: 7.2.8-173730~Ubuntu~noble
  Version table:
 *** 7.2.8-173730~Ubuntu~noble 500
        500 https://download.virtualbox.org/virtualbox/debian noble/contrib amd64 Packages
        100 /var/lib/dpkg/status

Mint 21.x shows the same package revision pattern with jammy in the suffix and repository line.

systemctl status vboxdrv --no-pager

Expected output includes:

● vboxdrv.service - VirtualBox Linux kernel module
     Loaded: loaded (/usr/lib/virtualbox/vboxdrv.sh; enabled; preset: enabled)
     Active: active (exited) since Wed 2026-04-22 11:03:01 AWST; 6min ago
    Process: 27815 ExecStart=/usr/lib/virtualbox/vboxdrv.sh start (code=exited, status=0/SUCCESS)
        CPU: 376ms

The active (exited) state is normal here. The helper script loads the modules successfully and then exits.

Install the VirtualBox Extension Pack on Linux Mint

The Extension Pack is optional. Install it only if you need Oracle’s branch-specific add-ons, and match it to the exact VirtualBox version already installed on your Mint system.

Oracle changed the archive prefix between older 6.1 or 7.0 builds and current 7.2 builds, so the small probe below picks the right filename automatically. Run the next three blocks in the same terminal session.

Oracle offers the pack for personal and educational use under its PUEL license.

Find the matching VirtualBox Extension Pack file

Start by extracting the installed VirtualBox version and probing the two archive names Oracle currently uses across supported branches.

VBOX_VERSION=$(vboxmanage -v | grep -oE '^[0-9]+(\.[0-9]+){2}')
EXTPACK_FILE=
for candidate in \
  "Oracle_VirtualBox_Extension_Pack-${VBOX_VERSION}.vbox-extpack" \
  "Oracle_VM_VirtualBox_Extension_Pack-${VBOX_VERSION}.vbox-extpack"
do
  EXTPACK_URL="https://download.virtualbox.org/virtualbox/${VBOX_VERSION}/${candidate}"
  if curl -fsI "$EXTPACK_URL" > /dev/null; then
    EXTPACK_FILE="$candidate"
    break
  fi
done
printf '%s\n' "$VBOX_VERSION" "$EXTPACK_FILE"

Expected output on the current Oracle 7.2 branch looks like this:

7.2.8
Oracle_VirtualBox_Extension_Pack-7.2.8.vbox-extpack

Older 6.1 and 7.0 branches usually resolve to the longer Oracle_VM_VirtualBox_Extension_Pack-... filename instead.

Download the matching VirtualBox Extension Pack

Download the file name you just resolved so the install stays aligned with the version already on the system.

curl -fsSLo "$EXTPACK_FILE" "https://download.virtualbox.org/virtualbox/${VBOX_VERSION}/${EXTPACK_FILE}"

Install and verify the VirtualBox Extension Pack

Install the Extension Pack, accept the license prompt, then verify what your installed branch actually exposes.

sudo vboxmanage extpack install --replace "$EXTPACK_FILE"

The --replace flag lets VBoxManage upgrade an older Extension Pack in place.

vboxmanage list extpacks

Expected output on the current 7.2.8 branch looks like this:

Extension Packs: 1
Pack no. 0:   Oracle VirtualBox Extension Pack
Version:        7.2.8
Revision:       173730
Edition:
Description:    Oracle Cloud Infrastructure integration, PXE ROM.
VRDE Module:
Crypto Module:
Usable:         true
Why unusable:

Older 7.0 and 6.1 branches still report the longer Oracle VM VirtualBox Extension Pack name and a different description. vboxmanage list extpacks is the reliable source for what your installed branch exposes right now.

rm -f "$EXTPACK_FILE"

Launch VirtualBox on Linux Mint

The package installs from a terminal, but the VirtualBox Manager still needs a graphical session to open.

virtualbox

You can also launch VirtualBox from the applications menu by searching for VirtualBox or Oracle VM VirtualBox, depending on which package branch you installed.

Install VirtualBox Guest Additions Inside Your Virtual Machines

Guest Additions install inside each guest VM, not on the Linux Mint host. After you start a VM, open Devices > Insert Guest Additions CD Image from the VM window and follow the installer inside that guest operating system.

Linux guests usually need their own build tools and matching guest kernel headers before the installer will finish. Oracle’s VirtualBox manual is still the best reference for the guest-specific steps.

Troubleshoot VirtualBox on Linux Mint

The most common Linux Mint VirtualBox problems are missing kernel modules, Secure Boot blocking those modules, or USB access failing because the current login session never picked up vboxusers.

Fix VirtualBox kernel module problems on Linux Mint

The repair path depends on which installation method you used. The Linux Mint package verifies modules directly, while Oracle’s package adds vboxdrv.service and /sbin/vboxconfig.

If you installed the Linux Mint package, reinstall the package, the DKMS build, and the matching headers for your running kernel.

sudo apt install --reinstall virtualbox virtualbox-dkms "linux-headers-$(uname -r)" -y

If you installed Oracle’s package, use the rebuild helper that ships with the 7.2 branch.

sudo /sbin/vboxconfig

If /sbin/vboxconfig returns command not found, you are almost certainly using the Linux Mint package rather than Oracle’s 7.2 package. Go back to the distro-package repair command instead of looking for a missing Oracle helper.

If the rebuild complains about missing compilers or make, install build-essential or follow the guide on how to install GCC on Linux Mint before trying again.

Handle Secure Boot when VirtualBox modules do not load on Linux Mint

Secure Boot can block VirtualBox modules even when the package itself installed cleanly.

sudo apt install mokutil -y && mokutil --sb-state

Legacy BIOS systems can return EFI variables are not supported on this system, which simply means Secure Boot is not active there. On UEFI systems that report Secure Boot as enabled, import the DKMS MOK Mint already stores on disk.

sudo mokutil --import /var/lib/shim-signed/mok/MOK.der

Set a one-time password, reboot, choose Enroll MOK from the firmware prompt, and enter that password. After the reboot, rerun the module check for the method you installed.

Fix VirtualBox USB access errors on Linux Mint

The usual USB error on Linux Mint comes from missing vboxusers membership, a stale login session, or an optional Extension Pack that was never installed.

groups "$USER" && vboxmanage list extpacks

If vboxusers is missing, sign out and back in after running the group command from the install section. If vboxmanage list extpacks shows Extension Packs: 0, the base package is still installed correctly and only the optional add-on is missing.

Update or Remove VirtualBox on Linux Mint

Update VirtualBox from Linux Mint repositories

The distro package stays on the VirtualBox branch Linux Mint currently ships.

sudo apt update && sudo apt install --only-upgrade virtualbox -y

Update Oracle VirtualBox 7.2 on Linux Mint

Oracle’s package also updates through APT, but its package name stays versioned.

sudo apt update && sudo apt install --only-upgrade virtualbox-7.2 -y

If the VirtualBox version changes, rerun the Extension Pack section so the add-on matches the new branch.

Remove VirtualBox from Linux Mint repositories

Use this removal path only if you installed the plain virtualbox package from Linux Mint’s own repositories.

sudo apt purge --autoremove virtualbox -y

purge removes the package and its saved configuration files, which is a cleaner fit when you are fully uninstalling VirtualBox instead of only removing the binaries.

Remove Oracle VirtualBox 7.2 from Linux Mint

Use this removal path only if you installed virtualbox-7.2 from Oracle’s repository.

sudo apt purge --autoremove virtualbox-7.2 -y

After removing the package, delete Oracle’s source file and key if you do not plan to use that repository again.

sudo rm /etc/apt/sources.list.d/virtualbox.sources /usr/share/keyrings/virtualbox.gpg && sudo apt update

Remove the VirtualBox Extension Pack and user data

Skip the Extension Pack step if vboxmanage list extpacks already shows Extension Packs: 0.

EXTPACK_NAME=$(vboxmanage list extpacks | awk -F': +' '/Pack no\. 0:/ {print $2; exit}')
sudo vboxmanage extpack uninstall "$EXTPACK_NAME"

The awk filter pulls the installed pack name from VBoxManage, which is safer than hardcoding a label that changed between older and newer VirtualBox branches.

Removing the paths below permanently deletes your VirtualBox settings and any virtual machines stored in the default location. Keep backups of any guest disks you still need before you continue.

Check which VirtualBox data directories exist in your home directory before deleting anything.

find "$HOME" -maxdepth 2 \( -path "$HOME/.config/VirtualBox" -o -path "$HOME/VirtualBox VMs" \) -print

You will only see ~/VirtualBox VMs after you create at least one VM in the default location. If the paths printed above are ones you want to remove, delete them with:

rm -rf "$HOME/.config/VirtualBox" "$HOME/VirtualBox VMs"

Conclusion

VirtualBox is ready on Linux Mint, whether you kept Mint’s simpler package or moved to Oracle’s newer 7.2 branch. When you start building guests, Oracle’s VirtualBox manual is still the most useful reference for VM creation, storage layouts, and guest-specific settings.

Search LinuxCapable

Need another guide?

Search LinuxCapable for package installs, commands, troubleshooting, and follow-up guides related to what you just read.

Found this guide useful?

Support LinuxCapable to keep tutorials free and up to date.

Buy me a coffee Buy me a coffee

6 thoughts on “How to Install VirtualBox on Linux Mint 22 and 21”

  1. Hello,
    Great tutorial that works perfectly on Linux Mint 22.

    Note that there is a typo on “Import the VirtualBox APT repository,” which mentions Mint 21 twice instead of Mint 22 in the box at the top.

    Thanks for these tutorials.

    Reply
Before commenting, please review our Comments Policy.
Formatting tips for your comment

You can use basic HTML to format your comment. Useful tags currently allowed in published comments:

You type Result
<code>command</code> command
<strong>bold</strong> bold
<em>italic</em> italic
<blockquote>quote</blockquote> quote block

Got a Question or Feedback?

We read and reply to every comment - let us know how we can help or improve this guide.

Let us know you are human: