With its huge collection of security tools, Kali Linux is the first choice for many users when it comes to ethical hacking. While many penetration testers use Kali as their primary operating system, this is not feasible for users who just want to try the OS.

Installing Kali Linux on a hypervisor like VirtualBox is viable in such situations. Anything you do inside the virtual machine won't affect your host system and vice versa. Also, you'll be able to use Kali Linux and your host operating system at the same time without any issues.

Let's see how you can install Kali Linux in VirtualBox.

Prerequisites to Install Kali Linux on VirtualBox

The traditional process of installing Kali Linux using an ISO file on VirtualBox is time-consuming, but it's still the recommended option if you want to install a complete version of Kali Linux.

To install Kali Linux on VirtualBox, you'll need the following software and hardware specifications:

  • Kali Linux ISO
  • VirtualBox
  • At least 20GB of disk space
  • 4GB of RAM

First of all, download the version of VirtualBox compatible with your host machine (Windows 10, 8, 7 or Linux) and install it on your system.

Download: VirtualBox

Next, download the Kali Linux ISO image from the website. Choose the Installer Images option and download the 64-bit installer ISO from the available options.

Download: Kali Linux

download kali linux for virtualbox

Step 1: Create a New Virtual Machine

Launch VirtualBox on your host machine and click the New button. Type the name you want your virtual machine to have. The recommended name is Kali Linux. VirtualBox will automatically select the Type and Version options for you. But if it doesn't, you can manually select Linux and Ubuntu (64-bit).

create a new kali linux virtual machine

If you don't want to store the virtual machine files in the default location, feel free to browse for a new path using the Folder option.

Next, browse the Kali Linux ISO from your local storage by clicking the dropdown menu next to ISO Image and selecting Other.

Expand the Hardware section and use the slider to select the memory size for your new virtual machine. VirtualBox automatically tells you that the recommended memory size is 2048MB. Choose 4096MB if you've at least 8GB of RAM available. Feel free to use 2048MB or 1024MB if you have a computer with less RAM.

hardware settings for kali linux virtualbox

To finalize hardware settings, move the Processors slider to where the green and red colors meet.

Do not check off the box labeled Enable EFI otherwise, Kali Linux will throw GTK errors when you try to boot the virtual machine.

Next, expand the Hard Disk section and check off the box next to Create a virtual hard disk now. Choose the option that says VDI (VirtualBox Disk Image) from the Hard Disk File Type and Variant dropdown menu.

hard disk settings for kali linux virtualbox

Now specify the amount of storage you want to provide to the virtual machine. Make sure you select at least 20GB as the hard disk size. Choose 40GB to ensure that your virtual machine doesn't run out of space. Once done, click the Finish button.

Your new virtual machine will be created. Now it's time to configure the virtual machine settings.

Step 2: Configure the Kali Linux Virtual Machine

Right now, you just have a virtual machine with basic configurations. To make the VM functional, you will have to make some changes to its settings. Highlight your virtual machine from the left pane and click the Settings button.

Select General and switch to the Advanced tab. Select Bidirectional in the Shared Clipboard and Drag'n'Drop options.

configure clipboard settings for Kali

From the left pane, select System and uncheck everything except Optical and Hard Disk under the Boot Order label. Also, reorder the entries so that Optical is the first and Hard Disk is the second boot device.

set up boot devices for kali

Also, switch to the Processor tab and click the Enable PAE/NX option.

setting up kali linux vm

From the left sidebar, click Display and select the maximum possible Video Memory for the virtual machine. Also, check off Enable 3D Acceleration.

Step 3: Start the VM and Install Kali Linux

Highlight the virtual machine from the left sidebar and click Start. Kali Linux will now boot using the ISO file you just selected. Select the Graphical Install option from the list. If you come across a mount error, ignore it and wait for the installer to load.

install kali linux on virtualbox

The system will start loading the necessary files. Select the language you prefer for the installation and click Continue. Next, choose your geographical location from the list of available options.

Select an appropriate keyboard layout for the virtual machine. Although the recommended option is American English, you can choose any other keyboard layout.

setting up keyboard layout kali linux

Kali Linux will now automatically detect and mount the installation media. A few more configurations will be done by the installer.

Enter the hostname for your virtual machine. For demonstration, let's keep the default hostname, which is kali. On the next screen, the system will ask you for a domain name. Simply click Continue to skip.

hostname for kali linux virtualbox

Enter the full name of the new user. On the next screen, type the username you want the user to have. Click on Continue to proceed and then type a strong password for the user account.

The next step is partitioning the disks. Since you're not dual-booting Kali Linux with another operating system, you can proceed with the Guided- use entire disk option. Select the hard disk file to partition and click Continue. Select Separate /home, /var, and /tmp partitions from the list of available options.

partitioning disk for kali linux vm

On the next screen, select Finish partitioning and write changes to disk and click Continue. Choose Yes and hit Continue again to confirm the process. The system will automatically start the installation for you.

Kali Linux will ask you for the files that you want to download. Choose an appropriate desktop environment that fits your needs and check the default -- recommended tools option (or large -- default collection plus additional tools, if available). Click Continue to proceed.

software selection for kali linux virtualbox

Kali Linux will start downloading the necessary files for the installation. Click Yes when the system asks you to install the GRUB bootloader to your primary drive. Select the hard drive from the list and click Continue.

After Kali Linux has finished installing, click Continue. The system will restart and boot into Kali Linux. When you see the login screen, enter the password that you set up during installation.

kali linux running inside virtualbox

If you prefer VMware over VirtualBox, consider installing Kali Linux on VMware Workstation instead.

Alternative Method: Installing the Kali Linux VirtualBox Image

Another way to install Kali Linux on VirtualBox is by using the prebuilt VirtualBox image. Unlike installing from the ISO, VirtualBox image files are easy and quick to install.

First, download the Virtual Machine image for VirtualBox from the Kali Linux website.

Download: Kali Linux (VirtualBox Image)

download kali linux virtualbox image

Extract the downloaded archive with an archive manager like WinRAR or 7-Zip. Then, double-click the VBOX file to run it in VirtualBox.

A new Kali Linux virtual machine will be created for you. You can then highlight its entry in VirtualBox and hit Start to boot the VM.

The default username and password for the system are kali.

Leverage the Power of Kali Linux in VirtualBox

Kali Linux is a well-known operating system that comes with a myriad of tools related to penetration testing and digital forensics. Although several Linux-based operating systems catering to ethical hackers are available, Kali Linux still stands out to be one of the best of the lot.

Apart from desktops, you can also install Kali Linux on Raspberry Pi. Kali Linux on a Raspberry Pi is extremely powerful and has huge potential when it comes to penetration testing and ethical hacking.