How to Install Kali Linux on VirtualBox: A Step-by-Step Guide

This step-by-step tutorial will show you and guide you through all the steps to install Kali Linux on VirtualBox.

Kali Linux is mainly used for advanced penetration testing and security auditing. It is a Debian-based rolling release Linux distribution that specifically caters to the likes of network analysts and penetration testers.

The central aspect of Kali Linux is its pre-installed security tool suite that can be used for various cyber-security purposes.

This guide is about installing Kali Linux on VirtualBox, allowing you to have a Kali VM. VirtualBox is free, open-source, and cross-platform virtualization software that creates virtual machines on top of your OS.

Download Kali Linux ISO Image

First, we need to download the installation ISO image. So point your browser to the Kali Linux website and click on the “Download” button.

Kali Linux Website

Choose the “Bare Metal” platform.

Download the installation ISO image

Select “Installer” from the available options, choose “64-bit“, and click on the download button to start downloading the ISO installation image.

Download the installation ISO image

Setting up a Virtual Machine in VirtualBox

1. To create a new virtual machine for installing Kali Linux on VirtualBox, open VirtualBox and click “New.”

Create a new Kali Linux on VirtualBox VM

2. Enter a name for your virtual machine (e.g., Kali-Linux), select “Linux” as the type, select “Other Linux (64-bit)” as the version, and click “Next.”

Choose Kali Linux on VirtualBox VM name

3. Allocate RAM to the virtual machine. The memory size depends on your host machine’s memory size. As our physical machine used in this example has enough RAM (32 GB), we’ll set 4 GB of RAM for a virtual machine to install Kali Linux on VirtualBox.

You can select any amount of memory you wish, but donโ€™t add more than 50% of your total RAM.

Click on the “Next” button to proceed.

Allocate RAM for virtual machine

4. Check the “Create a virtual hard disk now” option so we can later define our Kali Linux virtual hard disk size and click the “Create” button.

Create a virtual hard disk for Kali Linux on VirtualBox

5. Accept the default “VDI (VirtualBox Disk Image)” drive file type and click the “Next” button.

Hard disk file type

6. Next, weโ€™ll dynamically allocate storage on our physical disk. This option allows you to save space on your physical disk until the virtual disk grows to its maximum given size. Click the “Next” button.

Choose type of storage

7. The virtual hard drive is a section of your computerโ€™s hard drive space that will be used to store your virtual machine. Set the file size of the virtual disk to 20 GB or more. Click “Create” to finish setting up your Kali Linux virtual machine on VirtualBox.

Set virtual hard drive size

8. The wizard will close and go back to VirtualBox Manager. Select your Virtual Machine and click the “Start” button.

Start Kali Linux on VirtualBox VM

9. When you start Kali Linux virtual machine with VirtualBox, you must select a start-up disk. Start this process by clicking the little folder icon.

Select start-up disk

10. You will need to find and select the Kali Linux image (installation ISO file) you want to install. Click the “Add” button to bring up a file dialog box. Use this file dialog box to find and select the Kali Linux image you downloaded earlier.

Confirm your choice by clicking the “Choose” button.

Add the installation ISO image

11. With the Kali Linux ISO installation file selected, click the “Start” button.

Confirm start-up disk selection

Finally, we can install the Kali Linux operating system to our VirtualBoxโ€™s virtual machine. The virtual machine boots from the Kali Linux ISO installation image.

Install Kali Linux on VirtualBox

Things from here are Kali Linux-specific.

1. To install, choose the “Graphical install” option and press “Enter” to continue.

Start installing Kali Linux on VirtualBox

2. Choose the language you wish to use for the installation process and the installed system and click the “Continue” button.

Choose the language

3. Select your location and click the “Continue” button. This option sets your time zone, time format, etc.

Select your location

4. Choose your keyboard layout and click the “Continue” button. For the current installation, we will use “American English.”

Configure the keyboard

5. Wait for the installer to configure the settings it needs to proceed with the installation.

Detecting network hardware

6. Enter the hostname for your Kali Linux system, for example, “kali-vm.”

Set the hostname

7. If you donโ€™t use a domain in your network, you may leave this field empty. Click on the “Continue” button to proceed.

Set domain name

8. Set user account and password. Note that this is a user other than the root user. We will log in with this username once the installation completes.

So type your name and click “Continue” to proceed with installing Kali Linux on VirtualBox.

Create Kali Linux user account

9. Now, you will be asked to provide the username. Type it and click “Continue.”

Set the username

10. Then, set the password.

Set the password

11. Configure the system clock by setting the desired time zone and clicking “Continue.”

Configure the clock

12. Select how you would like to partition the hard disk. Unless you have a good reason to do it manually, go for the “Guided – use entire disk” option and click “Continue.”

Partition disk

13. Then, select which disk you want to use for partitioning. There should be only one option. Select “ATA VBOX HARDDISK” and click “Continue“.

Select a virtual hard drive

14. Next, select the scheme for partitioning. Choose the default, “All files in one partition,” and click “Continue.”

Select partitioning type

15. The wizard gives you an overview of the configured partitions. Next, select the “Finish Partitioning and Write changes to disk,” which should be selected by default, and click “Continue.”

Finish partitioning and write changes to disk

16. Choose “Yes” to confirm changes to the disk and click “Continue.”

Confirm disk partitioning changes

17. Installation of your base system will start. Wait for some time and let the process continue.

Installing base Kali Linux system on VirtualBox

18. From the next screen, you must specify what software you want to install. You can choose a desktop environment from here.

Default is Xfce, which is smooth, faster, and lightweight than others. So leave everything as it is and click on “Continue.”

Choose software for installation on Kali Linux on VirtualBox

19. The second part of installing Kali Linux on VirtualBox will begin. This step will take some time to complete, so have patience.

Installing software

20. Since no other operating systems and boot loaders are on a virtual disk, it is necessary to install GRUB. Select “Yes” and click “Continue.”

Install GRUB boot loader on Kali Linux on VirtualBox

21. You will be asked to select a boot loader device for GRUB installation. Select “/dev/sda” and click “Continue.”

Device for GRUB boot loader installation

22. The installation will continue. Wait for the process to complete.

Finish installing Kali Linux on VirtualBox

23. Once Kali Linux has finished installing itself, you will see a notification window. Click “Continue” to finalize the installation and wait for your new Kali Linux VM to reboot.

Installation complete

24. By now, you have successfully installed Kali Linux on VirtualBox. Your system will reboot, and you will see the screen.

Starting Kali Linux on VirtualBox

25. From now on, you can log in with the username and password you provided during installation to your newly installed Kali Linux on VirtualBox.

Login into Kali Linux on VirtualBox

You will be logged into Kali Linux Desktop.

Kali Linux on VirtualBox Successfully Installed

Installing VirtualBox Guest Additions on Kali Linux

VirtualBox Guest Additions is a set of drivers and system utilities intended to improve usability, virtual machine performance, and tight integration with a host OS.

To clarify, you must run these commands in the virtual Kali Linux system.

Update your Kali Linux guest operating system software packages:

sudo apt update
sudo apt upgrade

Once the upgrade completes, reboot your Kali Linux guest operating system and run:

sudo apt  install virtualbox-guest-x11

Finally, restart your system to reload kernel modules.

Now with Guest Additions installed, the clipboard of your guest OS can be shared with your host OS. To enable Shared Clipboard and Dragโ€™nโ€™Drop functionality, open VirtualBox Manager and click on “Settings.”

Kali Linux on VirtualBox settings

Next, go to the “General” -> “Advanced” tab and enable the two options from the drop-down menu.

Enable shared clipboard and drag and drop support

Conclusion

This guide taught you how to install Kali Linux on VirtualBox. If you encounter any issues with getting Kali Linux to install as a VirtualBox virtual machine, please feel free to ask your questions in the comment box below.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%