In this blog post, we will explain how to install VirtualBox on Linux Mint 22 step- by-step.
Linux Mint is a user-friendly and popular Linux distribution known for its ease of use and robust performance. If you are planning to run virtual machines on your Linux Mint 22 system, VirtualBox is an excellent choice.
VirtualBox is a powerful open-source virtualization tool that lets you run multiple operating systems on your Linux Mint 22 machine. Whether you need to run different Linux distributions, Windows, or any other operating system, VirtualBox provides a versatile and efficient solution.
Why Use VirtualBox on Linux Mint 22?
VirtualBox provides:
- Cross-platform compatibility: Run Windows, macOS, or other Linux distributions on your Linux Mint 22.
- Snapshots: Save the state of your virtual machines for easy restoration.
- Portability: Transfer virtual machines between systems effortlessly.
Prerequisites
- Pre-Install Linux Mint 22 System
- Sudo User with admin access
- Reliable Internet Connectivity
Without any delay, let’s jump into VirtualBox Installation steps.
1) Install Updates on Your System
It is highly recommended to install all available updates on Linux Mint 22 system. Open the terminal and run following apt command.
$ sudo apt update $ sudo apt upgrade -y
Post installing updates, reboot your system using following command.
$ sudo reboot
2) Install VirtualBox Dependencies
VirtualBox requires some dependencies to be installed on your system. To do this, enter the following command:
$ sudo apt install dkms build-essential linux-headers-$(uname -r) -y
This command will install the necessary components for building and installing VirtualBox kernel modules.
3) Add VirtualBox Apt Repository
At time of writing this post, VirtualBox 7.1 is available. But it’s package is not available in the default package repositories of Linux Mint 22. So, in order to install latest version of VirtualBox, add it’s official apt repository. Execute the following commands one after the another.
$ sudo apt install curl wget apt-transport-https gnupg2 -y $ wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg --dearmor $ echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian noble contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
Output above shows that VirtualBox APT repository has been added on your system.
4) Install VirtualBox on Linux Mint 22
Now, we are all set to install VirtualBox, run beneath apt commands,
$ sudo apt update $ sudo apt install virtualbox-7.1 -y
Replace virtualbox-7.1 with the latest version if a newer release is available.
5) Add Your Local User to VBoxusers Group
If you want your local user to manage virtualbox then add it to group “VBoxusers”, run
$ sudo usermod -aG vboxusers $USER $ newgrp vboxusers
6) Launch VirtualBox
Once the installation is complete, you can launch VirtualBox from the application menu or by running the following command:
$ sudo virtualbox
Or
Click on “Oracle VM VirtualBox”, it will take us to VirtualBox GUI as shown below:
This confirms that VirtualBox has been launched successfully. Kindly choose the appropriate experience model based on your requirements.
7) Add VirtualBox Extension Pack
In order to add some additional functionalities to your virtualbox like support for USB 2.0/3.0, VirtualBox RDP, disk encryption and PXE boot etc then install extension pack.
First download the extension pack file using wget command,
$ wget https://download.virtualbox.org/virtualbox/7.1.4/Oracle_VirtualBox_Extension_Pack-7.1.4.vbox-extpack
Next, install extension pack by running,
$ sudo vboxmanage extpack install Oracle_VirtualBox_Extension_Pack-7.1.4.vbox-extpack
Press “y” to accept license agreement of extension pack.
Head back to VirtualBox GUI and verify extension pack installation,
From the File Menu –> Tools –> Extension Pack Manager
Great, above screen shows that extension pack has been installed successfully. You are now ready to create and manage virtual machines on your Linux Mint 22 system with VirtualBox.
That’s all from this guide, If you found it helpful, share it with others in the Linux community. Feel free to drop your questions or feedback in the comments section below.
Also Read: How to Install VirtualBox Guest Additions on Linux Mint 21
Thank you very much for this. Having the step by step instructions as well as the screenshots helped.
Awesome!, These instructions are the best!
If 7.0 is not the latest version after installation, should all subsequent commands that say 7.0 be changed to the latest version number that’s actually installed or will the site(s) recognise the version that’s actually installed?
Hi Tim,
You should not worry about the latest version of VirtualBox, apt command will take care of it.
Hi! Thank you for the tutorial!!!
How can I install the Guest Additions?
Cheers
Thanks for the guide! In lLInux Mint 22 i got an error when trying to add the repository. Had to include apostrophes and change the Debian Distribution to Noble. This line worked:
echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/vbox.gpg] http://download.virtualbox.org/virtualbox/debian noble contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
OMG! thx m8, this the best tutorial.
I followed your guidance for installation of Guest Additions but unfortunately this time too I couldn’t succeed. The Outcome is as under.
mint@mint:~$ sudo apt install virtualbox-7.0 -y
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
virtualbox-7.0 : Depends: libvpx7 (>= 1.10.0) but it is not installable
Recommends: libsdl-ttf2.0-0 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
mint@mint:~$ sudo apt install virtualbox-7.0.16 -y
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
E: Unable to locate package virtualbox-7.0.16
E: Couldn’t find any package by glob ‘virtualbox-7.0.16’
May I request you for your further guidance?
It looks like you’re encountering dependency issues while trying to install VirtualBox 7.0 on Linux Mint. I would suggest install all updates and fix these broken packages issues. Post that try to install virtualbox.