How to Install VirtualBox 7 on Debian 12

Learn how to easily install VirtualBox on Debian 12 (Bookworm) with our step-by-step guide, and start virtualizing your systems today!

You’ve come to the correct place if you want to learn more about virtualization and take advantage of the ability to run different operating systems on a single computer. A popular and adaptable open-source virtualization program called VirtualBox lets you run many operating systems, including Windows, Linux, and macOS, concurrently on a single host computer. We’ll show you how to Install VirtualBox 7 on Debian 12, configure virtual environments, and easily manage virtual machines in this article.

Install VirtualBox on Debian 12 (Bookworm)

VirtualBox is widely used in professional settings, even though its primary target audience is home users. Regretfully, you cannot install it from the official Debian repository.

But you shouldn’t be bothered by this. We’re going to walk you through an easy way to install VirtualBox on your Debian 12 machine.

Step 1: Download and Import VirtualBox’s GPG Keys:

First things first, we need to download and import the VirtualBox signed GPG keys on our Debian 11 system to make sure the packages we receive to install VirtualBox are authentic.

Enter the following wget command to accomplish this, then pipe the output to the gpg tool:

wget -O- -q https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --dearmour -o /usr/share/keyrings/oracle_vbox_2016.gpg

Step 2: Add VirtualBox Repository for Debian 12:

We will add the official VirtualBox repository to our Debian 12 system after importing the GPG keys. This suggests that whenever a new version of the system is launched, the update package will be made accessible together with the other regular updates for your system.

Type the command indicated below to complete the task.

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle_vbox_2016.gpg] http://download.virtualbox.org/virtualbox/debian bookworm contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list

Step 3: Run System Update:

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

sudo apt update
 

Updating the list of available packages.
Updating the list of available packages.

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

Step 4: Install VirtualBox on Debian 12 (Bookworm)

Everything is ready for the installation process itself. Now, execute the following instructions to install VirtualBox on Debian 12:

sudo apt install virtualbox-7.0
Installing VirtualBox on Debian 12 (Bookworm).
Installing VirtualBox on Debian 12 (Bookworm).
That’s it. You can now use VirtualBox on your Debian 12 Linux system since it is installed.

Step 5: Install VirtualBox Extension Pack (Optional):

Although this is an optional step, I highly recommend doing so as it will simplify and expedite the process of using VirtualBox on your Debian system.

The VirtualBox Extension Pack makes a ton of amazing things possible, like:

  • USB 2 and USB 3 support
  • VirtualBox Remote Desktop Protocol (VRDP)
  • Host webcam passthrough
  • Disk image encryption with AES algorithm
  • Intel PXE boot ROM

One quirk, though, deserves to be mentioned here. It is advised that the version of the VirtualBox Extension Pack correspond with the VirtualBox version that is set up on your Debian 12 system.

Thus, you can use the built-in VirtualBox command vboxmanage to confirm which version of the installed locally VirtualBox is the exact one:

 
vboxmanage -v | cut -dr -f1
Check the installed VirtualBox version.
Check the installed VirtualBox version.

The installed version of Virtualbox is 7.0.10, as you can see. As a result, you need to obtain the Extension Pack for that same version.

In the command below, replace all instances of 7.0.10 with the current version if your installation is different. You may also view the available versions by going directly to the downloads page.

wget https://download.virtualbox.org/virtualbox/7.0.10/Oracle_VM_VirtualBox_Extension_Pack-7.0.10.vbox-extpack

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

sudo vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-7.0.10.vbox-extpack

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

Install VirtualBox Extension Pack.
Install VirtualBox Extension Pack.
 

You can verify that the extension pack was installed correctly by running the following:

vboxmanage list extpacks
List installed VirtualBox Extension Packs.
List installed VirtualBox Extension Packs.

Step 6: Add User to the vboxusers Group:

Before using VirtualBox, 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 the user to the vboxusers group.
Add the user to the vboxusers group.

Step 7: Running VirtualBox on Debian 12:

Launching VirtualBox from the desktop environment’s application menu will allow you to begin using it.

Starting VirtualBox.
Starting VirtualBox.
 
VirtualBox is installed and running on Debian 12.
VirtualBox is installed and running on Debian 12.

Conclusion

While protecting the host system from any conflicts and negative impacts, VirtualBox offers developers, IT professionals, and enthusiasts a vital platform to test applications and OSes in isolated environments.

Installing VirtualBox on Debian 12 (Bookworm) is a simple procedure that enables users to effectively construct and manage virtual environments.

Utilizing VirtualBox to its fullest capacity, users can run different operating systems on a single machine with ease by following the comprehensive tutorial that is supplied.

In addition, we also recommend checking the official documentation for individuals who want to learn more about the features offered by VirtualBox and how to use them effectively.

 

Leave a Reply

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