HomeLinuxHow to Install VirtualBox on Linux

How to Install VirtualBox on Linux

If you are a Linux user and want to run multiple operating systems on your machine without the need for separate physical hardware, VirtualBox is a great solution. In this guide, we will walk you through the steps to install VirtualBox on Linux using the sudo apt install command.

Step 1: Update System Packages

Before installing VirtualBox, it is recommended to update your system packages to ensure you have the latest software versions. Open your terminal and run the following command:

				
					sudo apt update && sudo apt upgrade
				
			

Step 2: Install Pre-Requiest

First, you need to import the VirtualBox repository key so that you run the below command on your terminal.

				
					wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
				
			

Now we are going to add the VirtualBox repository to a separate file so that it does not interfere with the Kali Linux main repository.

				
					echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian buster contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
				
			

VirtualBox has different kernel modules (such as vboxdrv, vboxnetflt, and vboxnetadb), and we need to make sure to update them when the Kali kernel is updated. It can be archived with dkms. So execute the below command

				
					sudo apt install -y dkms
				
			

Step 3: Install VirtualBox

Once you will complete the above process you can proceed with the installation of VirtualBox. Run the following command in your terminal:

				
					sudo apt install -y virtualbox virtualbox-ext-pack
				
			

This command will install VirtualBox and the VirtualBox Extension Pack, which provides additional functionality like USB 2.0 and 3.0 support, VirtualBox Remote Desktop Protocol (VRDP), and more.

How to Install VirtualBox on Linux
Output for installing the virtualbox in linux

Step 4: Verify Installation

After the installation is complete, you can verify if VirtualBox is installed correctly by running the following command:

				
					virtualbox
				
			
How to Install VirtualBox on Linux
Output for run virtualbox on linux

Installing Virtual Box on kali-Linux is a straightforward process using the sudo apt install command. With VirtualBox, you can create and run virtual machines on your Linux system, allowing you to test different operating systems or run software that is not compatible with your primary OS. Enjoy exploring the world of virtualization with VirtualBox!

RELATED ARTICLES

Leave a reply

Please enter your comment!
Please enter your name here

- Advertisment -

Most Popular

Recent Comments