This post may contain affiliate links/ads and I may earn a small commission when you click on the links/ads at no additional cost to you. As an Amazon Affiliate, I earn from qualifying purchases. Techsphinx also participates in the StationX Affiliate program. You can read my full disclaimer here.
Kali Linux is an open-source Linux based operating system designed for penetration testing. It has more than 600 tools pre-installed, which makes it the best operating system in terms of security testing.
If you want to practice hacking, you need to have a pen-testing lab. I have written a post where I have shown how to create one.
Hacking for Beginners: Setup a Penetration Testing Lab
There are two ways to install Kali Linux on VirtualBox:
1. Download and import the kali Linux VirtualBox image provided by kali itself. (Quickest way)
2. Manually install Kali Linux on virtualbox using the ISO file.
The first way to import kali Linux image on VirtualBox has been covered in my “setup a pen-testing lab” post.
In this post, we are going to cover the second way, that is, to install kali Linux on VirtualBox using the ISO file.
- Minimum 20 GB of free disk space.
- Minimum 4 GB of RAM.
- VirtualBox installed and running.
- Internet to download Kali Linux ISO image.
Steps for Installing Kali Linux on VirtualBox
This guide is intended for beginners, so I have put screenshots of every step.
Don’t get intimidated by the number of screenshots in this post.
Step 1: Download Kali Linux ISO image
You can go to download section of kali Linux website to download the latest ISO image of the operating system.
Download Kali Linux 64 bit or 32-bit iso file depending on your system architecture.
Only Download the “Installer” version, don’t download the “Live” or “NetInstaller” version.
The time it takes to download depends on your internet speed, once its downloaded you can proceed to next step.
Step 2: Create Kali Linux VirtualBox Container
Let’s create a new virtualbox container for kali linux.
1. Start VirtualBox
2. Click on New to create a new vm.
3. Fill the necessary details:
Name: Kali Linux (You can enter any name of your choice)
Machine Folder: Location of the vm file. (you can leave it as default)
Version: Linux 2.6 / 3.x / 4.x (64bit) (if you’ve downloaded 64bit version of kali)
4. Click on Next.
5. Memory: Select a memory size for your virtual machine. I am giving it 2 GB; you can select the amount of RAM depending on the RAM available on your main machine.
6. Click Next.
7. Hard Disk: Select “Create a Virtual Hard Disk Now” and click Next.
8. Hard Disk File Type: Select VDI (Virtual Disk Image) and click Next.
9. Storage on Physical Hard Disk: Select Dynamically Allocated and click Next.
10. File Location and Size: Choose a location for virtual hard disk (or leave it as default) and select the amount of hard disk for Kali Linux (20 GB Recommended). I am giving it 25GB.
11. Click Create.
Step 3: Configure Virtual Machine Settings
Before starting to install kali Linux on VirtualBox, let’s configure the settings for the kali virtual machine.
1. Select Kali Linux and click on the settings icon.
2. Go to “System” tab and untick the floppy from boot order.
3. Now, go to the “Storage” tab and click on “Empty” under the “Controller: IDE”
4. Click on the blue icon next to the “Optical drive” field.
5. Click on “Choose a Disk file” option.
6. Browse and select the Kali Linux ISO file you downloaded earlier.
7. Once the ISO image is selected, you’ll notice that the “Empty” under the “Controller: IDE” changed to the Kali ISO file. You can also see the changes in the information area.
8. Click ok.
Step 4: Installing Kali Linux on VirtualBox
Finally, let’s install kali Linux on VirtualBox.
1. Select Kali Linux and click on start button.
2. Select start-up Disk: Click on the yellow icon, and select the Kali Linux ISO file.
3. Click on Start.
4. Kali Linux Installer Menu: Select “Graphical install”.
5. Select a language: Select your preferred language and click continue.
6. Select your location: Choose your location from the list and click continue.
7. Configure the keyboard: Choose your preferred keyboard layout and click continue.
8. Configure the Network: Select name server address. You can also leave this field empty if you don’t want to use a name server (I am leaving it empty). Click on continue
9. Enter a hostname for your system: (I am using “kali” as hostname). You can also change hostname later. Click on continue.
10. Enter a domain name: If you don’t have a domain name registered, you can make something up (I am using “example.com”). Click on Continue.
11. Set up users and Passwords: Enter your full name and click continue.
12. Select a username: You can enter any username you want and click on continue.
13. Setup Password: Set password for your user you created earlier. and click on continue.
14. Configure the clock: Select your preferred time-zone and click continue.
15. Partition Disks: Unlike installing on main hardware, you can choose “Guided – use the entire disk” option on VirtualBox. Partitioning hard disk for VM doesn’t affect the main system. It will create the partitions in the VDI disk we created earlier. Click on continue.
16. Select the disk and click continue.
17. Choose all files in one partition (recommended for new users) and click on continue.
18. Select Finish Partitioning and write changes to disk and click on continue.
19. Select “Yes” to write changes and click on continue.
The installation process will begin.
After installing the base system, you’ll be prompted with software selection.
20. Software Selection: Choose the software you want to install (If you are unsure then you can also leave it as default) and click continue.
It will take some time to complete the software installation. Once it is completed you’ll be prompted to install the GRUB bootloader.
21. Install the GRUB bootloader: Select “Yes” and click continue.
22. Select /dev/sda drive for bootloader installation and click continue.
23. Finish the installation: Click continue to boot into your Kali system.
Once Kali is booted, you’ll see Kali Linux login screen.
Login into Kali using the username and password you created earlier.
You’ll see the Kali Linux Desktop.
Step 5: Installing VirtualBox Guest Additions on Kali Linux (optional)
This step is optional.
Installing VirtualBox guest editions will allow you to copy-paste and drag and drop files between both main and Kali machine.
1. Open Terminal and update the repositories in Kali:
sudo apt update
2. Now, install the virtualbox-guest-x11 package:
sudo apt install virtualbox-guest-x11
3. Reboot the Kali machine.
shutdown -r now
4. Now go to “Virtual Machine settings” and select “General” tab.
5. Under General tab click on “Advanced” and change “Shared clipboard” and drag’n’drop to bidirectional using dropdown.
6. Click Ok.
Now you can copy-paste and drag and drop files from your main machine to the Kali machine and vice versa.
Installing Kali Linux on VirtualBox is not that hard. The graphical method makes it pretty straightforward.
I hope this guide helped you to install kali Linux on VirtualBox without any problems.
If you have any thoughts related to this post, then you can comment down below.
Have fun with Kali!!
If you like this post, then follow Techsphinx on Facebook and Twitter for more reviews, tricks, tips and tutorials.
This article needs update or correction? Report the issue here so I can update it.