How to install VirtualBox on Debian 11 Bullseye (Testing)
$ sudo apt install build-essential dkms linux-headers-amd64
$ cd Downloads/
$ wget https://download.virtualbox.org/virtualbox/6.1.22/virtualbox-6.1_6.1.22-144080~Debian~buster_amd64.deb
$ sudo chmod +x VirtualBox*.run
$ sudo ./VirtualBox*.run
$ vboxversion=$(wget -qO - https://download.virtualbox.org/virtualbox/LATEST.TXT)
$ wget "https://download.virtualbox.org/virtualbox/${vboxversion}/Oracle_VM_VirtualBox_Extension_Pack-${vboxversion}.vbox-extpack"
$ sudo vboxmanage extpack install --replace Oracle_VM_VirtualBox_Extension_Pack-${vboxversion}.vbox-extpack
$ sudo usermod -aG vboxusers $USERNAME
$ sudo reboot
Source:
All credits goes to @AmineTech https://www.youtube.com/channel/UCzL3-V01MvHCCskME3kSFMA