How to Install Kali Linux on VirtualBox – Virtualization has made life a lot easier for anyone who wants to run multiple operating systems on their computer. Before this, most of us had to run operating systems from different partitions using a bootloader. Thanks to virtualization, you no longer have to pick between operating systems; you now have more choices than ever before. You can run multiple operating systems on different virtual machines and use them as if they were applications.
Why would you want to run another operating system (OS) on top of another? Isn’t Windows enough? Don’t get me wrong; Windows is a great OS but there are tools that it lacks. For instance, Linux has a better command line terminal. Most users find that Windows is more user-friendly so they’d rather stick with it as their main operating system. Although they may want to install another OS for educational purposes or run software that can only work for that operating system. An awesome operating system that’s worth installing and exploring is Kali Linux.
Also Read : How To Defrag Your Computer Hard Drive
How to Install Kali Linux on VirtualBox?
Kali Linux is a Debian based Linux distribution designed primarily for security testing. It’s a great tool for testing how secure applications, operating systems, and websites are. It’s also a great tool for ethical hacking. As great as it is, users may not want to make Kali their main operating system. To solve this problem, we’ll use virtualization.
Oracle’s VM VirtualBox is an extremely popular cross-platform virtualization tool. Cross-platform means that it can work on different operating systems, including Linux and Mac OS. It’s extremely lightweight, free and easy to set up. It also allows you to use multiple virtual machines. Virtual machines are basically emulated computers within a computer.
In this tutorial, I endeavor to make your experience with setting up VirtualBox and Kali Linux super simple.
A few things to note before setting up:
Oracle’s VirtualBox isn’t heavy on system resources. The minimum amount of RAM you’ll need is 512 MB and 180 MB of hard drive space. Everything else is dependent on the virtual machine(s) you’ll be running on it. Kali Linux requires:
- A minimum of 20GB Hard Drive Space
- A minimum of 1 GB Ram
- USB or CD ROM Support
All in all, I recommend that you allocate and budget:
- 25GB Hard Drive Space
- 2GB of Ram
- Windows 7/8/10
Processor speed isn’t important but I recommend one with a minimum speed of 1.6 GHz. Basically, if you can run Windows 7 smoothly, then you should have no problem running a virtual machine.
The necessary files you’ll need for this tutorial are:
How To Install Kali Linux On Virtualbox : Setup Guide
Navigate to where you’ve downloaded and saved the setup file for VirtualBox and run it.
Once the setup welcome screen opens, click on the “Next” button.
This will take you to the custom installation screen where you can choose which features and aspects of the application you want to install. You can also select the directory you want the installed files to go. I recommend that you leave everything as it is and click on the “Next” button once again.
You’ll be prompted to select the way the features will be installed on the next screen. Again, I recommend you leave the tick boxes the way they are and click on “Next”.
You will be flashed with a warning screen. If you continue with the setup it will disconnect you from the network. Make sure you pause all on-going downloads from your Web browsers and verify that you’re okay with being disconnected from the network. If you’re ready to proceed then click on “Yes”.
The final setup screen will ask you for confirmation before the installation. If you’re happy with your installation settings, you can click on “Install”.
The setup shouldn’t take very long, depending on the specifications of your computer. While VirtualBox is installing, you might find that you have to accept a few dialogs and read a few warnings from Windows. This is all natural. Once the installation is finished and you’re ready to run VirtualBox and install Kali Linux, check the “Start Oracle VM VirtualBox 5.2.2 after installation” checkbox and then click on “Finish”.
Setting up VirtualBox and Installing Kali Linux on it
When you open up virtual box for the first time, you’ll find a nice minimized user interface with a welcome screen. The left panel should be empty unless you’ve previously created a virtual machine.
If you’re ready to install the Kali Linux Virtual machine, click on the new gear icon on the top left side of the screen, just above the Virtual Machine panel.
This will bring up the “Create Virtual Machine” wizard. There are two modes in this wizard; Guided Mode or Expert Mode. We’ll stick to guided mode to make everything easier for us. The first screen on the wizard allows you to name the Virtual Machine. You can name it whatever you want but I recommend that you name it “Kali Linux” just to avoid any missteps. Under “Type”, select Linux. If you expand the Version drop-down menu, you’ll notice that there’s no option for Kali.
Since Kali Linux is a Debian based Linux kernel, we’ll select Debian as the version. Choose between either 64 bit or 32 bit depending on your processor architecture and the version of Kali you downloaded. After you’re done your screen should look like this:
Click on “Next”. This will take you to a screen that allows you to allocate the amount of RAM that will be dedicated to your VM. I recommend that you assign 2 GB (2048 MB) to it although 1 GB (1024 MB) is enough. You can either use the slider or the numeric input field. After you are done with this screen, click on next.
The next screen will ask you if you want to create a Virtual Hard Disk (VHD), use one that has already been created or skip this part of the setup. Skipping means that you will not use a hard disk at all. Since this is a fresh installation and we want to make it as simple as possible, we are going to create a new VHD now. Select the second radio dial and click on “Create”.
You will then be asked to choose the hard disk type. Let’s run down the differences between the types:
a. Virtual Disk Image (VDI): VirtualBox’s native format.
b. Virtual Hard Disk (VHD): This is the native format for Microsoft’s Virtual PC
c. Virtual Machine Disk (VMDK): VMWare’s native format.
There’s no real difference in performance between these types. I recommend that you choose VMDK because it has the widest range of virtualization software support. So if you decide to use Software besides VirtualBox for your virtualization needs, it will be easy to migrate the virtual disk and re-use it.
After selecting which format you want, click on “Next”
The proceeding screen will allow you to choose whether the disk should grow dynamically or stick to a fixed size. To possible save hard disk space, I recommend that you choose to dynamically allocate size. Leave the “Split into files less than 2GB” option unchecked and then click on next.
You will then be prompted to assign and allocate the file size of the virtual disk. We are going to allocate 25 GB. By default, VirtualBox will save the Virtual Disk in its root folder under the virtual machine name i.e (C:\Users\[USERNAME]\VirtualBox VMs\Kali Linux). You can change this by clicking on the icon next to the text box. I chose to save it on an external hard drive. After you’ve done selecting where you want to save the disk and allocating the disk size, you can click on “Create”.
When you’re done, you’ll notice your newly minted virtual machine on the left of your welcome screen, underneath the virtual machine panel. It should be powered off. Double click on it and wait for it to start up.
When it finally boots up, it will ask you to select a boot disk. Click on the browse button next to the text field and navigate to where you downloaded and saved the Kali Linux Image (.iso). We’re going to use it as a start-up disk.
How To Install Kali Linux On Virtualbox – Steps
Give it a few seconds and it will launch the Kali Linux Boot Menu. Click in the middle of the screen and let Virtual Box capture the mouse. Use the keyboard arrow button to go down the menu and select graphical install then give it a few minutes to mount and decompress the setup files.
As soon as it’s done loading, it will take you to a screen where you can choose a language to install Kali Linux in. Choose whatever language you want but by default, it will be set to English. Use the arrow keys of your keyboard to navigate towards the option you want to choose. As soon as you’re done, click on continue.
Next, it will ask you to choose what region you’re located in so the system can select your time zone. Select what country you’re in and click on continue.
You will then be asked to configure and map your keyboard based on which region it’s from. Select your keyboard’s region and click on continue.
As soon as you select your keyboard, it will start copying some files across so you can set up your network configuration.
On the following screen, you can configure the hostname. You can leave it as Kali (if you want).
You will then be prompted to input a domain name. You can choose to name it. ‘.org’, ‘.net’, ‘.edu’ or even ‘.mdu’. As soon as you set your domain name, click “Continue”.
The next screen will allow you to set a root system password. Enter your preferred password and then click on “Continue”.
The setup will prompt you to set a username. Set your username and then once again, click on continue.
You will then be given a chance to set the user password. Set your password and then click on continue.
The setup will then allow you to configure the clock then detect your disks on the proceeding screen. After it’s done with this, it will take you to the Partition Disks screen. From here we can choose how we want to partition our disks. You’ll get three options:
a. Guided-use entire disk (Without LVM)
b. Guided-use entire disk and set up LVM
c. Guided-use entire disk and set up Encrypted LVM
LVM stands for Logical Volume Management. It’s used as a tool for striping, renaming, allocating and mirroring logical volumes. Since we want to keep it simple, we’re going to select the first option (Guided-use entire disk) and then click on continue.
You will be asked which drive you want to partition. Select the Hard Disk you intend on installing Linux on. This will be the virtual drive we created earlier on.
Select the default virtual drive we created earlier then click on continue.
You can set how you want to position and format your partitions (Partitioning scheme) on the adjoining screen. Once again, we’re trying to keep things simple and this is a virtual drive so we’ll select “All file in one partition” then click on continue.
Once that’s done and it is successful, you can then click on “Finish Partitioning and Write changes to Disk” at the bottom and then click continue.
The proceeding screen will show you how your disks will be partitioned. It should be separated into two different partitions. Primary – ext4 and logical – swap.
Select “Finish partitioning and write changes to disk” then click on continue.
You will be prompted to confirm formatting and partitioning. If you’re satisfied with it, select the yes radio button and then click on continue.
The next step requires you to wait while Linux installs itself on your virtual machine.
After the installation is complete, it will ask if you want to use a network mirror. Select “No” and then continue. On the adjoining screen, it will ask you to confirm if you don’t want to use a network. Click on Yes and continue.
This will take you to the GRUB installation screen which will ask you if you want to install the GRUB boot loader on to the master boot record. To which you’ll answer yes by selecting the appropriate radio button and then clicking on continue.
The installation will then take you to a screen where you can decide on which drive you’ll install the GRUB loader. Select the second option in the list which technically houses the MBR. Click on continue.
After the system is done installing the GRUB bootloader, it will take you to the final installation screen which informs you that it’s done with the setup. Click on continue so the installer can do some clean-up work. It will then remove all temporary files and packages and do some finalization.
When it’s done, all you’ll need to do is enter your username-(root) and password you set earlier on in the setup.
There you have it! Through Oracle’s VirtualBox, you’ll be able to configure and utilize all of Kali Linux’s tools. Whenever you get bored with it, you can simply delete the virtual hard drive without doing any heavy uninstallation. The beauty of virtualization is the ability to encapsulate operating systems without fully committing to them. I hope you found this tutorial helpful. If you find any of the steps unclear and need help, do not hesitate to comment below. Thank you for reading.