In this blog post, we will cover how to install VirtualBox on Linux Mint 21 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 21 system, VirtualBox is an excellent choice.
VirtualBox is a powerful, open-source virtualization tool that allows you to run multiple guest operating systems (VMs) on a single host machine. Whether you need to run different Linux distributions, Windows, or any other operating system, VirtualBox provides a versatile and efficient solution.
- Pre-Install Linux Mint 21 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 21 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 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
Latest version of VirtualBox 7 is not available in the default package repositories of Linux Mint 21. So, for its installation, let’s add the apt repository using following commands.
$ sudo apt install curl wget apt-transport-https gnupg2 $ curl -fsSL https://www.virtualbox.org/download/oracle_vbox_2016.asc|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/vbox.gpg $ echo deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/vbox.gpg] http://download.virtualbox.org/virtualbox/debian jammy contrib | sudo tee /etc/apt/sources.list.d/virtualbox.list
Output in above screen shows that VirtualBox APT repository has been added on your system.
4) Install VirtualBox on Linux Mint 21
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.0” with the latest version if there’s a newer release 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
Click on “Oracle VM VirtualBox”, it will take us to VirtualBox GUI as shown below:
This confirms that VirtualBox has been launched successfully.
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.0.12/Oracle_VM_VirtualBox_Extension_Pack-7.0.12.vbox-extpack
Next, install extension pack by running,
$ sudo vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-7.0.12.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 21 system with VirtualBox.
That’s all from this blog post, kindly do post your queries and feedback in below comments section.