VirtualBox is a cross-platform (available on Windows, Linux, and macOS) and open-source virtualization software developed by Oracle. It is used to create and run multiple virtual machines (VMs) on a single physical computer. You can install an operating system (any Linux distribution, Windows, macOS, and any BSD distribution, etc.) of your choice in those virtual machines and try out any software on them in an isolated environment. This gives you the ability to test out new things without affecting/damaging the physical computer. You can also create a software development environment on the virtual machines and run your favorite development tools to make your work more efficient.
In this article, we will show you how to install VirtualBox 7 on Debian 12 “Bookworm”.
- Enable the Hardware Virtualization on Your Computer
- Installing the GCC and Linux Kernel Headers to Build the VirtualBox Kernel Modules
- Downloading the Latest Version of Oracle VirtualBox for Debian 12
- Downloading the VirtualBox Extension Pack
- Updating the Debian 12 APT Package Database Cache
- Installing VirtualBox 7 on Debian 12
- Running VirtualBox on Debian 12
- Installing the VirtualBox Extension Pack on VirtualBox
For VirtualBox virtual machines to perform well, you must enable the hardware virtualization on your computer from the BIOS/UEFI Firmware of the motherboard. How you enable it on your motherboard depends on the vendor of the motherboard that you’re using on your computer.
If you need any assistance in enabling the hardware virtualization from the BIOS/UEFI Firmware of your computer, read the article on How to Enable the VT-x/VT-d/AMD-v Hardware Virtualization Feature from the BIOS/UEFI Firmware of Your Motherboard.
To compile the VirtualBox kernel modules on Debian 12, you must have the GCC C/C++ compiler and Linux kernel headers installed on your Debian 12 system.
If you need any assistance in installing the GCC C/C++ compiler on your Debian 12 system, read the article on How to Install the GCC C/C++ Compiler on Debian 12.
If you need any assistance in installing the correct Linux kernel headers on your Debian 12 system, read the article on How to Install the Linux Kernel Headers on Debian 12.
To download the latest version of Oracle VirtualBox for Debian 12, visit the VirtualBox Downloads page from your favorite web browser.
Once the page loads, click on “Debian 12” as marked in the following screenshot:
Your browser should start downloading the VirtualBox DEB package file. It takes a while to complete.
At this point, the VirtualBox DEB package file should be downloaded.
The VirtualBox Extension Pack adds a lot of advanced features to VirtualBox. These features will make your VirtualBox experience a lot better.
To download the VirtualBox Extension Pack, visit the “Downloads” page of VirtualBox.
Once the page loads, scroll down to the “VirtualBox Oracle VM VirtualBox Extension Pack” section and click on “All supported platforms”.
NOTE: Make sure to download the same version of the VirtualBox Extension Pack as the version of the VirtualBox that you’re downloading. Since you are downloading the VirtualBox and VirtualBox Extension Pack at the same time, the version number will most likely match.