How to Install VirtualBox on Debian 11 (Bullseye): A Step-by-Step Guide

This tutorial shows the easiest way to install VirtualBox on Debian 11, a general-purpose full virtualizer app for x86 hardware.

VirtualBox is cross-platform, free, and open-source software that allows you to virtualize the x86 computing architecture. It has allowed open-source enthusiasts and IT professionals to host many operating systems on a single host machine for years.

Although VirtualBox is primarily aimed at home users, it is also commonly utilized in professional environments.

Unfortunately, in Debian’s case, due to a lack of cooperation from upstream on security support for older releases, VirtualBox is unavailable for installation in the official Debian stable repositories.

Fortunately, there is an effortless way to install VirtualBox on Debian 11, which we will show you now.

However, if you’re using Debian 12, check our comprehensive and easy-to-follow “How to Install VirtualBox on Debian 12 (Bookworm)” guide.

Install VirtualBox on Debian 11 (Bullseye)

The tutorial will use the sudo command and assuming you have sudo privileges.

Step 1: Download and Import VirtualBox’s GPG Keys

To ensure that the packages we receive to install the VirtualBox are genuine, first, we should download and import the VirtualBox signed GPG keys on our Debian 11 system.

To do so, type the following commands:

wget -O- -q | sudo gpg --dearmour -o /usr/share/keyrings/oracle_vbox_2016.gpgCode language: JavaScript (javascript)
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 11

After importing the GPG keys, we’ll add the official VirtualBox repository to our Debian 11 system. This implies that the update package will be made available with the rest of your system’s regular updates if a new version is released.

To accomplish it, type the command shown below.

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle_vbox_2016.gpg] bullseye contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.listCode language: PHP (php)
Add VirtualBox Repository for Debian 11
Add VirtualBox Repository for Debian 11.

Step 3: Run System Update

Before we proceed with VirtualBox installation on our Debian 11 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 11 (Bullseye)

Everything is already prepared for the actual installation. Now, to install VirtualBox on Debian 11, run the following commands:

sudo apt install virtualbox-7.0Code language: CSS (css)

When prompted, type Y to confirm that you want to install it and press Enter.

Installing VirtualBox on Debian 11 (Bullseye)
Installing VirtualBox on Debian 11 (Bullseye).

That’s all. The VirtualBox is installed and ready to be used on your Debian 11 Linux system.

Step 5: Install VirtualBox Extension Pack

This is an optional step, but 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 AES algorithm
  • Intel PXE boot ROM

One peculiarity should be highlighted here. The VirtualBox Extension Pack’s version must match the version of VirtualBox installed on your Debian 11 system.

So, to verify the exact version of the installed locally VirtualBox, you can use vboxmanage, a build-in VirtualBox’s command:

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

As you can see, the version of Virtualbox installed is 7.0.6. Therefore, the Extension Pack with the same version must then be downloaded.

So, use the below wget command to download the Extension Pack for VirtualBox.

If your installation is different, replace both places containing 7.0.6 in the command below with the current version. In addition, you can also go straight to the downloads page and look at the available versions.

wget language: JavaScript (javascript)

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

sudo vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-7.0.6.vbox-extpackCode language: CSS (css)

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

Installing VirtualBox Extension Pack
Install VirtualBox Extension Pack.

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

vboxmanage list extpacksCode language: PHP (php)
List installed VirtualBox Extension Packs
List installed VirtualBox Extension Packs.

Step 6: Add User to vboxusers Group

Before using VirtualBox, you should add your user account to the vboxusers group. This is quick and simple to accomplish by running:

sudo usermod -a -G vboxusers $USERCode language: PHP (php)

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

groups $USERCode language: PHP (php)
Add user to vboxusers group
Add user to vboxusers group.

Step 7: Running VirtualBox on Debian 11

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

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


That concludes our guide on installing VirtualBox on Debian 11 (Bullseye). We hope you find this guide helpful. Thanks for your time!

We recommend checking the official documentation for individuals who want to learn more about the features offered by VirtualBox and how to use them effectively.

Your feedback and comments are most welcome.

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.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%


  1. Hello,

    I try it several but sitill the same problem in point 4.

    root@debian:~# apt install virtualbox-6.1
    Reading package lists… Done
    Building dependency tree… Done
    Reading state information… Done
    E: Unable to locate package virtualbox-6.1
    E: Couldn’t find any package by glob ‘virtualbox-6.1’

    • Hi Gustavo,

      The tutorial has been updated with the recently released version of VirtualBox 7.
      Please, repeat the steps and be sure you don’t miss any.


  2. Hey Bobby,

    many thanks for your article. I think it’s not a good idea to ignore the deprecated message of apt-key. There’s a good reason for it. Ignoring this messages would cause the system to accept signatures from the third-party keyholder on all other repositories configured on the system. This is bad. A better way would be:

    1. wget -q -O- | gpg –dearmour -o /usr/share/keyrings/oracle_vbox_2016.gpg
    2. echo “deb [signed-by=/usr/share/keyrings/oracle_vbox_2016.gpg] bullseye contrib” | sudo tee /etc/apt/sources.list.d/virtualbox.list

    BTW: There’s no need to use “oracle_vbox.asc” AFAIK.

    Best regards,


    • Hi Linand,

      I completely agree with the points you made. Thanks for that!
      The necessary changes have been made, and the guide has been updated.


  3. Excellent article and it helped me to successfully install Oracle Virtual Box in no time … Thanks a Million!

  4. Hi Bobby,
    Thank you for the excellent tutorial.
    I’m trying to setup Virtualbox on Raspberry 4, 4GB with Raspbian OS Bullseye (Debian 11)
    All was running fine until Step4:
    sudo apt install virtualbox-7.0
    E: Unable to locate package virtualbox-7.0
    E: Couldn’t find any package by glob ‘virtualbox-7.0’
    I tried also other version numbers, but all the same.
    Whats wrong?

  5. Your step by step instructions on quickly installing virtualbox on my debian operating system worked flawlessly. Thanks a whole bunch.

Leave a Reply

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