How to Install VirtualBox on Debian 13 “Trixie”

Learn how to seamlessly install VirtualBox on Debian 13 “Trixie” step by step with our tried-and-tested guide, and start running VMs right away.

VirtualBox is one of the most popular and widely used virtualization tools, and it remains a favorite among Linux users. If you’re running Debian 13 “Trixie” and looking for a straightforward way to install it, well… you’re in the right place.

In this guide, I’ll walk you through simple, proven step-by-step instructions for installing VirtualBox on Debian 13. In just a few minutes, you’ll be all set to start creating and running your first virtual machines. So, let’s get started.

Install VirtualBox on Debian 13 “Trixie”

VirtualBox isn’t included in the official Debian repositories because of licensing and maintenance reasons. But don’t worry—you can still get it. Here I’ll show you how to install it directly from the official VirtualBox repository.

Step 1: Import VirtualBox’s Repo GPG Key

First, we’ll import the GPG key from the VirtualBox repository to ensure the authenticity of the software we install from it.

wget -O- -q https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --dearmour -o /usr/share/keyrings/oracle_vbox_2016.gpgCode language: Bash (bash)
Import VirtualBox’s repository GPG Key.
Import VirtualBox’s repository GPG Key.

Notice that the command produces no output.

Step 2: Add VirtualBox Repository for Debian 13

Next, we’ll add the official VirtualBox repository to our Debian 13 system. This way, if a new version is released, the update package will be made available with the rest of your system’s regular updates.

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle_vbox_2016.gpg] http://download.virtualbox.org/virtualbox/debian trixie contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.listCode language: Bash (bash)
Add the VirtualBox repository.
Add the VirtualBox repository.

Step 3: Run System Update

Before we proceed with VirtualBox installation on our Trixie system, we should refresh the list of available packages. Run the command below to update the APT repositories index.

sudo apt updateCode language: Bash (bash)
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 for use.

Step 4: Install VirtualBox on Debian 13 “Trixie”

We’re all set to install the more up-to-date VirtualBox release on our Debian 13 system. Run the following commands:

sudo apt install virtualbox-7.2Code language: Bash (bash)
Installing VirtualBox on Debian 13 "Trixie".
Installing VirtualBox on Debian 13 “Trixie”.

Wait for the installation to complete. Congratulations, we are done! But hold on before you run it—we have a few small but important things to take care of first.

Install VirtualBox Extension Pack

Although this is an optional step, I strongly encourage it because it will make working with VirtualBox on your Debian system easier and more convenient. VirtualBox Extension Pack unlocks many great features, such as:

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

However, one peculiarity should be highlighted here. The Extension Pack’s version is recommended to match the version of VirtualBox installed on your Debian 13 system. To verify the exact one of the just-installed VirtualBox, you can use a built-in vboxmanage command:

vboxmanage -v | cut -dr -f1Code language: Bash (bash)
Check the installed VirtualBox version.
Check the installed VirtualBox version.

As you can see, the installed version of VirtualBox is “7.2.0.” Therefore, you need to download the Extension Pack with the same version. Use the wget command below to download the appropriate Extension Pack for VirtualBox.

However, if your installation’s version differs, replace both instances of “7.2.0” in the command below with the corresponding version. You can also visit the downloads page to view the available releases.

wget https://download.virtualbox.org/virtualbox/7.2.0/Oracle_VirtualBox_Extension_Pack-7.2.0.vbox-extpackCode language: Bash (bash)

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

sudo vboxmanage extpack install Oracle_VirtualBox_Extension_Pack-7.2.0.vbox-extpackCode language: Bash (bash)
Install VirtualBox Extension Pack.
Install VirtualBox Extension Pack.

Additionally, you can verify the installed VirtualBox extension pack version by running the following:

vboxmanage list extpacksCode language: Bash (bash)
Verify the installed VirtualBox Extension Pack version.
Verify the installed VirtualBox Extension Pack version.

Add User to vboxusers Group

And one final touch. Before using VirtualBox, add your user account to the “vboxusers” group. This is quick and simple to accomplish by running:

sudo usermod -aG vboxusers $USERCode language: Bash (bash)

Now, perform a reboot. After login, check that you are in the “vboxusers” group with this command:

groups $USERCode language: Bash (bash)
Check the user’s groups.
Check the user’s groups.

Running VirtualBox on Debian 13 “Trixie”

You can start using VirtualBox by launching it from the desktop environment’s application menu.

Starting VirtualBox.
Starting VirtualBox.
VirtualBox is installed and runs on Debian 13 "Trixie".
VirtualBox is installed and runs on Debian 13 “Trixie”.

Hit the “New” button and start virtualizing your ideas.

How to Uninstall VirtualBox

If you want to uninstall VirtualBox from your Debian 13 box for any reason, you can easily do so by running the command below.

sudo apt purge virtualbox-7.2Code language: Bash (bash)

Then, additionally, you can also “clean” your system from unnecessary package dependencies and finally remove the VirtualBox repository itself from the list of available ones.

sudo apt autoremove
sudo rm /etc/apt/sources.list.d/virtualbox.listCode language: Bash (bash)

Conclusion

That’s it, folks! With VirtualBox up and running on your Debian 13 system, you’re ready to dive in and start bringing your virtualization ideas to life. Hopefully, this guide gave you the jumpstart you needed.

Lastly, I recommend consulting the official documentation for individuals who want to learn more about VirtualBox’s features and how to utilize them effectively.

Thanks for your time. Your feedback and comments are, as always, most welcome. Happy virtualizing!

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Leave a Reply

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