One of the most popular virtualization platforms is Oracle VirtualBox, known for its versatility, ease of use, and robust feature set. In this blog post, we'll guide you through the process of installing Oracle VirtualBox 7.1 on a Debian 12 Linux system. Additionally, we'll show you how to install the VirtualBox Extension Pack, which adds advanced features like USB 2.0 and 3.0 support, RDP, and more.
By the end of this tutorial, you'll have a fully functional VirtualBox environment on your Debian system, ready to host your virtual machines. Let's get started!
Table of Contents
Step 1: Install Necessary Dependencies
Before installing Oracle VirtualBox, ensure all dependencies are met by running the following commands:
sudo apt update && sudo apt -y full-upgrade
sudo apt install -y gcc make linux-headers-$(uname -r) libqt5core5a libqt5gui5 libqt5widgets5 libqt5opengl5 libqt5printsupport5 libqt5x11extras5 libqt5network5 libqt5dbus5
sudo apt -y autoremove && sudo apt -y autoclean
Once the packages are updated, reboot your system to apply the updates.
Step 2: Download and Add Oracle Public Key
You'll need to add the Oracle public key to verify the packages. Download and add the Oracle public key using command:
wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg --dearmor
Step 3: Add Oracle VirtualBox Repository
Create a virtualbox.list
file under the /etc/apt/sources.list.d/
directory:
sudo nano /etc/apt/sources.list.d/virtualbox.list
Add the following line:
deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib
Make sure your repository configuration uses the correct keyring. Double check the keyring path is correct. Save the file and close it.
And then, update the software source list using command:
sudo apt update
Step 4: Install VirtualBox 7.1 in Debian 12
Now, install VirtualBox 7.1 using command:
sudo apt install -y virtualbox-7.1
Step 5: Start VirtualBox
Once the installation is complete, you can start VirtualBox from your application menu or by typing:
virtualbox
This should launch the default interface of Oracle VirtualBox 7.1.
When VirtualBox is launched for the first time, you will be prompted to choose your experience mode. It offers two modes namely Basic and Expert.
The Basic Mode is intended for a users who are not interested in advanced functionality and prefer a simpler, cleaner interface. And the Expert Mode is intended for experienced users who wish to utilize all VirtualBox functionality.
Choose the mode that you want to apply. You can change this later either from the Global Preferences or the Machine Settings windows.
Here is how VirtualBox 7.1 looks like in Debian 12.
Congratulations! We have successfully installed VirtualBox 7.1 on Debian 12 Linux system.
Step 6: Install Extension Pack
For additional features like USB support, you should install the VirtualBox Extension Pack. Download the Extension Pack for 7.1 version from the VirtualBox Downloads page using command:
wget https://download.virtualbox.org/virtualbox/7.1.0/Oracle_VirtualBox_Extension_Pack-7.1.0.vbox-extpack
Install it using the following command:
sudo VBoxManage extpack install Oracle_VirtualBox_Extension_Pack-7.1.0.vbox-extpack
Press 'y' and hit ENTER key to agree the license terms and install the extension pack.
You can verify if the extension pack is installed from command line using command:
sudo VBoxManage list extpacks
Sample Output:
Extension Packs: 1 Pack no. 0: Oracle VirtualBox Extension Pack Version: 7.1.0 Revision: 164728 Edition: Description: Oracle Cloud Infrastructure integration, Host Webcam, VirtualBox RDP, PXE ROM, Disk Encryption, NVMe, full VM encryption. VRDE Module: VBoxVRDP Crypto Module: VBoxPuelCrypto Usable: true Why unusable:
Alternatively, you can verify it from the VirtualBox interface as well. To do so, open VirtualBox manager and go to Files -> Tools -> Extension Package Manager.
You should see the installed extension packs here.
That's it. The extension pack for VirtualBox is installed and loaded.
In our upcoming tutorials, we will learn about VirtualBox interface, create our first Virtual machine and a lot more interesting topics. Stay tuned!
Related Read: