How to Install Kali Linux in VirtualBox on Windows

BySumit
6 min read

Discover the quickest and easiest way to install Kali Linux on Windows via VirtualBox. A detailed step-by-step guide for setting up your virtual hacking lab.


VirtualBox is a virtualization software that allows you to run multiple operating systems on a single physical machine. It is developed by Oracle Corporation. With VirtualBox, you can run multiple virtual machines, each with its own operating system, on a single computer. This makes testing new software and configurations easy without affecting your main operating system.

Why Use Kali Linux on VirtualBox?

Kali Linux is a powerful tool for security professionals and ethical hackers, but it can be dangerous if used incorrectly. You can protect your main operating system from any potential harm by running Kali Linux in a virtual machine on VirtualBox. Additionally, running Kali Linux on VirtualBox allows you to test and experiment with the operating system in a safe and controlled environment.


1. Download and Install VirtualBox on Windows 11 (or 10)

First, you must set up a few items for Windows to install VirtualBox. The VirtualBox installer will fail if you don't install these:

  • Microsoft Visual C++ 2019 Redistributable: VirtualBox in Windows requires this package. Download it from the Microsoft website (link under x64) and install it.
  • Python: It requires Python. Download Python from the official page and follow the installation setup.

Once the above two items are ready, download VirtualBox from the official website: Download VirtualBox

Run the setup to install VirtualBox. After installation, restart Windows.

2. Kali Linux ISO image download

After completing the VirtualBox installation, download the Kali Linux ISO image file. The ISO image is a file that contains all the data necessary to install Kali Linux on your computer. You can directly download the ISO file or use the torrent to download it. Download Kali Linux

3. Create a new virtual machine and configure storage, memory

Once you have installed VirtualBox, launch the application from the Windows Start menu and click the "New" button to create a new virtual machine.

  1. In the create virtual machine window, give it any meaningful name.
  2. Keep the Folder Name unchanged. This is the path where the virtual machine file will be created.
  3. In the ISO Image field, browse for the Kali Linux ISO file you downloaded.
  4. Make sure to choose Type=Linux and Version=any 64-bit Linux.
  5. Click on Hardware and select the RAM you want for your virtual box. A rule of thumb is that your VM's RAM size should be less than your physical RAM in the host system. I would recommend using 2 GB to 4 GB for a virtual machine on an 8 GB RAM system. For 4 GB RAM, use the slider (or type in) to make it 4096 MB.
  6. Choose the processor count as 2 or 4.
  7. Click on the Hard Disk section, and keep the file location unchanged. Give a minimum of 20GB to 25GB for Kali Linux installation.
  8. Keep the hard disk file type value as VDI (VirtualBox Disk Image).
  9. Do not select pre-allocate full size.
  10. Finally, click on Finish.

4. Install Kali Linux on the virtual machine

With the virtual machine configured, you can now proceed with the installation of Kali Linux.

  1. Click the "Start" button in the toolbar or right-click > select Start > Normal Start.
  2. After a successful boot, you should see a screen showing various options for installing Kali Linux. Select the first default option to start the installer.
  3. In the next few screens, select your Language, region, and other basic details.
  4. Add any hostname you want.
  5. In the next screen, keep the domain name blank. Then give your name and username (the login name) and enter the password.
  6. In the partition screen, select "Guided – use entire disk". This is the best option for installing in VirtualBox.
  7. Select all files in one partition.
  8. Select finish partitioning and write changes to disk. Select Yes in the next screen.
  9. Continue with the installation as per the on-screen instructions.
  10. When the software selection prompt appears, select the default ones, which feature the Xfce desktop environment and key hacking tools. Hit enter to continue.
  11. Wait for the installation to finish (approximately 10 minutes). When asked about the GRUB installation, answer Yes, choose the device /dev/sda, and continue.
  12. Click on Restart Now after the installation is complete.
  13. Use the user id and password to log in. You should now see the Kali Linux desktop running inside VirtualBox!

5. Starting and Upgrading Kali Linux in VirtualBox

Once you have installed Kali Linux, it is important to update and upgrade the operating system to ensure that you are running the latest packages. Open a terminal and run the following command:

sudo apt update && sudo apt upgrade

6. Installing Guest Additions (optional)

After the installation, you should install the VirtualBox Guest Additions. This is a set of packages you need to install inside the guest VM to enable shared folders, bi-directional copy/paste, and automatic resolution change.

  1. Boot into Kali Linux. From the VirtualBox menu, select Devices > Insert Guest Additions CD Image.
  2. Open the file manager, open the mounted folder, right-click, and select Open in Terminal.
  3. Run the following command:
sudo ./VBoxLinuxAdditions.run
  1. After the above command is complete, restart your Kali Linux VM.

7. Enable Copy and paste between Windows and Kali Linux

To enable copy and paste between Windows and your Kali Linux system, select Devices > Shared Clipboard > Bi-directional from the VirtualBox menu.

8. Shutting down Kali Linux VM

Ideally, you should shut down a VM from its own power-off menu. However, you can also shut it down from the main VirtualBox window. Right-click on the VM name and select Close > Poweroff.

9. How to delete Kali Linux and remove all data

If you want to delete the Virtual machine entirely and its data, simply right-click the VM, select Remove, and choose Delete all files.


Setting up a hacking lab using VirtualBox is the safest and most convenient way to learn ethical hacking. Let me know if you run into any errors!

Comments (1)

A
AkshayMay 13, 2026

What about VMware