How to Install Kali Linux on Virtualbox?


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.

Pre-Requisites

  • 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.

Download Kali Linux

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:

Create New VM in VirtualBox

Name: Kali Linux (You can enter any name of your choice)

Machine Folder: Location of the vm file. (you can leave it as default)

Type: Linux

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.

Allocate RAM for Kali Linux

6. Click Next.

7. Hard Disk: Select “Create a Virtual Hard Disk Now” and click Next.

Create a virtual hard disk for Kali

8. Hard Disk File Type: Select VDI (Virtual Disk Image) and click Next.

Select Hard disk file Type

9. Storage on Physical Hard Disk: Select Dynamically Allocated and click Next.

Select Dynamically allocated

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.

Select File Location and Size for Kali Linux

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.

Kali Linux VM Settings

2. Go to “System” tab and untick the floppy from boot order.

Untick 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.

Edit Storage settings

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.

Storage settings done

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.

Start Kali VM

2. Select start-up Disk: Click on the yellow icon, and select the Kali Linux ISO file.

Select Startup Disk

3. Click on Start.

4. Kali Linux Installer Menu: Select “Graphical install”.

install kali linux on virtualbox
Kali Linux Graphical Install

5. Select a language: Select your preferred language and click continue.

install kali linux on virtualbox
Select Language

6. Select your location: Choose your location from the list and click continue.

install kali linux on virtualbox
Select Location

7. Configure the keyboard: Choose your preferred keyboard layout and click continue.

install kali linux on virtualbox
Configure Keyboard in Kali Linux

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

Configure Nameserver (Leave Empty)

9. Enter a hostname for your system: (I am using “kali” as hostname). You can also change hostname later. Click on continue.

install kali linux on virtualbox
Enter hostname for your system

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.

install kali linux on virtualbox
Enter Domain name

11. Set up users and Passwords: Enter your full name and click continue.

Enter your Full Name

12. Select a username: You can enter any username you want and click on continue.

install kali linux on virtualbox
Enter Username

13. Setup Password: Set password for your user you created earlier. and click on continue.

Set password for the user

14. Configure the clock: Select your preferred time-zone and click continue.

install kali linux on virtualbox
Select Time zone

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.

install kali linux on virtualbox
Guided partition – Use Entire Disk

16. Select the disk and click continue.

Select Disk

17. Choose all files in one partition (recommended for new users) and click on continue.

Select – All Files in one Partition

18. Select Finish Partitioning and write changes to disk and click on continue.

Write changes to Disk

19. Select “Yes” to write changes and click on continue.

Confirm Partitioning

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.

install kali linux on virtualbox
Software Selection in Kali Linux

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.

Install Grub Bootloader

22. Select /dev/sda drive for bootloader installation and click continue.

GRUB install Location

23. Finish the installation:  Click continue to boot into your Kali system.

install kali linux on virtualbox
Installation is Completed

Once Kali is booted, you’ll see Kali Linux login screen.

Login into Kali using the username and password you created earlier.  

install kali linux on virtualbox
Kali Linux Desktop

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.

Switch to Bidirectional

6. Click Ok.  

Now you can copy-paste and drag and drop files from your main machine to the Kali machine and vice versa.

Conclusion    

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.


Like it? Share with your friends!

Rahul R Nair

Rahul is obsessed with technology and electronic devices. He is also the founder of TechSphinx. Being a technophile, he is always busy doing some techy stuff or learning about the latest technologies. When not busy with his usual routine (staring at the computer screen) he likes to write and share his knowledge with the world.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x