Installing VirtualBox on Debian Based Systems

Installing VirtualBox on Debian Based Systems

Virtualbox runs as a hypervisor on top of your host operating system, enabling you to create virtual machines on top of your host machine. In this tutorial I go through installing virtualbox on Debian based systems. This tutorial assumes you have the bare host requirements to run virtualbox see: https://www.virtualbox.org/wiki/End-user_documentation as well as have a Debian based Linux Distro running on your system, that’s it! The official Virtualbox install docs can be found here for Linux Systems: https://www.virtualbox.org/wiki/Linux_Downloads.

Adding the VirtualBox Repository

We first need to add the virtualbox repository to our repository list and verify the repository’s integrity. We need to edit the /etc/apt/sources.list file and add the repository info there.

To edit the file we will enter the nano editor via:

							
							
					sudo nano /etc/apt/sources.list				
			

And we will add the following line to the file:

							
							
					deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian <mydist> contrib				
			

Be sure to replace <mydist> with your operating system’s codename, for instance as per virtualbox.org “For Debian 11 and older, replace ‘<mydist>’ with ‘bullseye’, ‘buster’, or ‘stretch’. For Ubuntu 22.04 and older, ‘replace ‘<mydist>’ with ‘jammy’, ‘eoan’, ‘bionic’, ‘xenial'”. You can quickly look up your OS version’s codename also.

We will then download and register the public key via: 

							
							
					wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg --dearmor				
			

Installing VirtualBox

Now we will install virtualbox via the virtualbox repository. We need to update our packages via: 

							
							
					sudo apt update

				
			

And finally we will install Virtualbox via:

							
							
					sudo apt install virtualbox-7.0      # or whatever the latest version of virtualbox is at the time of reading				
			

You should then be able to launch virtualbox from your app menu! The official docs get into more specifics and a little troubleshooting should things go wrong, see: https://www.virtualbox.org/wiki/Linux_Downloads

Once you launch VirtualBox it will look like this:

BIOS Config

Before you create any virtual machines (or if you attempt to create a VM and get an error like, virtualization disabled in BIOS) you may need to enable virtualization in your host’s BIOS, this is extremely simple, you just need to restart your machine, enter the BIOS (usually via  one of the F2, F10, F12, Esc or Delete keys) go to the virtualization tab and enable the settings related to virtualization. Apply the changes and finish logging in, you should now be able to create VMs in VirtualBox!

That’s it! I hope you enjoyed it and found it useful!

Walter Miely is a tech entrepreneur and CEO of Phoenix Ignited Tech You can find him on Linkedin. This material is licensed under the CC BY 4.0 License LEGAL DISCLAIMER: The content provided here is provided AS IS, and part of, or the entirety of this content may be incorrect. Please read the entireLegal Disclaimer here.