Install VirtualBox on Debian 12

user1272047user1272047
1 min read

To install VirtualBox on Debian 12 ("Bookworm"), follow these steps:


Step 1: Add VirtualBox Repository

Run the following commands to add the official VirtualBox repository:

sudo apt update
sudo apt install -y gnupg wget
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo tee /usr/share/keyrings/oracle_vbox.asc
echo "deb [signed-by=/usr/share/keyrings/oracle_vbox.asc] https://download.virtualbox.org/virtualbox/debian bookworm contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list

Step 2: Install VirtualBox

Update the package list and install VirtualBox:

sudo apt update
sudo apt install -y virtualbox-7.0

Step 3: Verify Installation

Check the VirtualBox version to ensure it’s installed correctly:

virtualbox --version

Step 4: (Optional) Install Extension Pack

Download and install the extension pack for additional features like USB 2.0/3.0 support:

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

Step 5: Add Your User to the vboxusers Group

To run VirtualBox without sudo, add your user to the vboxusers group:

sudo usermod -aG vboxusers $(whoami)

Log out and back in for the changes to take effect.


0
Subscribe to my newsletter

Read articles from user1272047 directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

user1272047
user1272047