In this guide, we will cover the installation of VirtualBox 7.0 on Debian 11 / Debian 10 Linux system. VirtualBox 7.0 is available for Windows and Linux users with plenty of new features. For those new to VirtualBox, it is a free to use and feature-rich Virtualization platform for x86 and AMD64/Intel64 systems.
For other platforms, refer to how to install VirtualBox on Ubuntu / CentOS / Fedora. Follow these few steps to install and enjoy VirtualBox on Debian 11|10 Desktop Linux distribution.
Step 1: Update your system
The first step is to ensure your system is updated.
sudo apt update && sudo apt -y upgrade
Reboot since there could be kernel updates.
[ -f /var/run/reboot-required ] && sudo reboot -f
Step 2: Import VirtualBox apt repository
Once the system is updated, import repository GPG key used for signing packages.
sudo apt -y install curl wget gnupg2 lsb-release
curl -fsSL https://www.virtualbox.org/download/oracle_vbox_2016.asc|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/oracle_vbox_2016.gpg
curl -fsSL https://www.virtualbox.org/download/oracle_vbox.asc|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/oracle_vbox.gpg
Step 3: Add the VirtualBox Repository
After the importation of GPG key, add VirtualBox repository to your system using the following commands.
echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
Step 4: Install VirtualBox & Extension pack
The final step is the actual installation of VirtualBox and extension pack which extends VirtualBox features.
sudo apt update
sudo apt install linux-headers-$(uname -r) dkms
sudo apt install virtualbox-7.0
Download Extension Pack:
cd ~/
VER=$(curl -s https://download.virtualbox.org/virtualbox/LATEST.TXT)
wget https://download.virtualbox.org/virtualbox/$VER/Oracle_VM_VirtualBox_Extension_Pack-$VER.vbox-extpack
You can also download it manually https://www.virtualbox.org/wiki/Downloads
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-*.vbox-extpack
You can also click file to install it and wait for the installation to complete.

Step 5: Launching VirtualBox 7 on Debian
Once VirtualBox is installed, you can launch it using the terminal or Desktop applications search.
$ virtualbox
You should now have the latest version of VirtualBox installed on your Debian 11 / Debian 10.
Related guides:
- How to extend/increase KVM Virtual Machine (VM) disk size
- How to Provision VMs on KVM with Terraform
- How to Create CentOS / Fedora / RHEL VM Templates on KVM
- How to disable netfilter on a KVM bridge
Hi there!
I followed this steps and when I run sudo /sbin/vboxconfig it showing the following message.
And when I run command: uname -r the result is: 5.15.95-16520-g682786dc5340
Please help. Thank you
vboxdrv.sh: Stopping VirtualBox services.
libkmod: ERROR ../libkmod/libkmod-module.c:1668 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory
libkmod: ERROR ../libkmod/libkmod-module.c:1668 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory
libkmod: ERROR ../libkmod/libkmod-module.c:1668 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory
vboxdrv.sh: Starting VirtualBox services.
libkmod: ERROR ../libkmod/libkmod-module.c:1668 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel “header” files matching the current kernel
for adding new hardware support to the system.
This system is currently not set up to build kernel modules.
Please install the Linux kernel “header” files matching the current kernel
for adding new hardware support to the system.
There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root. If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system’s documentation for more information.
Thank you very much for this guide !!!
I didn’t knew there was a virtualbox repository all that !
Yes very powerful!