In this article, we want to teach you How To Install VirtualBox on Debian 11.
VirtualBox is open-source software for virtualizing the x86 computing architecture. It acts as a hypervisor, creating a VM (virtual machine) where the user can run another OS (operating system).
The operating system where VirtualBox runs is called the “host” OS. The operating system running in the VM is called the “guest” OS.
VirtualBox supports guest operating systems such as Windows, Debian, Fedora, Oracle Linux, Ubuntu, and more.
How To Install VirtualBox on Debian 11
To install VirtualBox on your server, you need to log in to your server as a non-root user with sudo privileges. To do this, you can follow our article about the Initial Server Setup with Debian 11.
Now you can follow the steps below to install VirtualBox on Debian 11.
One way that you can use to set up VirtualBox on Debian 11, is to install it from the Oracle repository.
First, you need to install gnupg2 on your server with the following command:
sudo apt install gnupg2
Then, you need to import the repository GPG key with the following commands:
$ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - $ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
Here you can add the VirtualBox repository on Debian 11 with the command below:
echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian bullseye contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
Now update your local package index with the following command:
sudo apt update
You can use the following command to search which package version is available for VirtualBox to install:
sudo apt-cache search virtualbox
Next, install VirtualBox with the following commands:
$ sudo apt install linux-headers-$(uname -r) dkms $ sudo apt install virtualbox-6.1
When your installation is completed, you can launch VirtualBox with the following command:
Or from your activities search for VirtualBox and launch it.
You will see:
If you see this means that you have correctly set up VirtualBox on your server.
Now you can start using it.
At this point, you learn to set up VirtualBox from the Oracle repository on Debian 11.
Hope you enjoy using it.
May this article on the orcacore website be useful for you: