In this tutorial you will learn how to install Kali Linux on Virtualbox on Linux. Kali Linux is a Linux distro mainly used for Security Research, Penetration testing, Computer forensics and Reverse Engineering.
Kali Linux supports
Arm Devices
Bare Metal
Cloud
Containers
Mobile
USB
Virtual Machine
WSL
In this tutorial we are going to make a full install of Kali Linux on Virtualbox, even though kali linux provides virtual machine ready images, which means you don't have to install anything but you can simply upload kali linux image to Virtualbox and it will give you full access to Kali Linux system. However, this is not the goal of this tutorial, it is better I recommend you learn to Install Kali linux by yourself step by step as you can customize it as you want.
So let's start
Download Kali Linux - Live Mode
https://cdimage.kali.org/kali-2022.2/kali-linux-2022.2-live-amd64.iso
Download Kali Linux - Bare Metal ISO
https://cdimage.kali.org/kali-2022.2/kali-linux-2022.2-installer-amd64.iso
Simply copy and paste the url above and the downloading should start.
Note: I'm using the Live Mode ISO of Kali Linux for this tutorial, because you can Test Kali Linux before you install it on your machine, but this also means it will install the default xfce4 desktop environment and default tools.
If you want to be able to Install a different desktop environment such as Gnome or KDE then you can download the bare metal ISO and Install it, the installations steps are the same, all you have to do is replace the live boot ISO with the bare metal one on VirtualBox and follow the steps on this tutorial.
Step 1 - Open VirtualBox
Click the New button as shown on the image below
Step 2 - Set OS Name
Next, choose a name for your system, You can set "Kali Linux" as your OS name, this will not only change the name but it will also set the correct Type and Version based on your hardware.
Machine Folder : Is the folder path where the system will be installed, you can change this to your preferred location
If this doesn't happen, make sure Type: is set to Linux and Version: set to the correct version of Kali Linux that you downloaded (64bit or 32bit)
Once you are done with all fields click Next
Step 3 - Select the ram size
Kali Linux requires 2GB of Ram and 20GB of Space when using Kali Linux desktop which includes a full installation of Kali Linux with xfce4 desktop environment
Once you set the ram size continue by clicking the Next button
Step 4 - Hard Disk
Check the box " Create a virtual hard disk now" and click the Create button
Step 5 - Select the Hard Disk filetype
If you plan to use Kali linux only on Virtualbox then you can go with the first option "VDI", if you want this installation to be able to use it on other virtualization softwares such as "Qemu" or "Vmware" you can choose the "VHMDK" format.
VDI - Will create an hdd image that is designed to work only on Virtualbox
VHD - Is the standard disk format of Microsoft
VHMDK - Virtual Machine Disk will create an image that will work on all virtualization softwares such as "Vmware" "Qemu" and "VirtualBox"
Once you've selected the file type you want click Next button
Step 6 - Virtual HDD Size
On this step you need to choose if you want the virtual hard disk size to be Dynamic or Fixed
Dynamically allocated - Means the virtual disk space will be dynamic, this means whatever space you have on your physical hard drive it will be available to use as virtual hdd by Kali Linux. If you are planning to use kali linux as a secondary Desktop and you are unsure about how much space that would take, then you can go with "Dynamically allocated" option.
Fixed - Kali linux requires 20GB of disk space. So you can set the virtual hdd space to 20GB and that will work, however you might want some more space if you plan to download more packages and for your personal files too. I'd recommend a virtual hdd of 40GB.
On this tutorial I went with a fixed space of 40GB, now click the Create button to create the virtual hdd
And you will see this pop up, this means the virtual hdd is being created so you may want to give it some time to complete, this type of format takes longer than dynamically allocated so grab yourself a coffee :)
Step 7 - Add Kali Linux ISO
Once the virtual hdd has been successfully created, now you need to attach the Kali Linux ISO on virtualbox
Select Kali Linux on Virtualbox then right Click the Settings button as shown on the image below
This will open the Settings Window
Now you need to Go to "Storage" next click on "Empty" cd icon under Controller:IDE, then on Otical drive: You need to import the ISO file, in this case Kali Linux file to do this, simply click the cd Icon with the down arrow and go to choose a disk file.
And now select Kali Linux iso " kali-linux-2022.2-live-amd64.iso" and click the Open button to import the ISO
Once you have imported Kali Linux ISO, you should see this window, all you have to do now is to click the "OK" button
Installing Kali Linux
1)Start Kali Linux VM
Select "Start Installer" and press enter
2) Language
Next Select Language and click Continue
3) Location
Next Select your location and click again Continue
4) Keyboard Layout
Next, select keyboard layout
5) Set hostname
You can set anything you want as hostname, set the hostname and click Continue
6) Set domain name
You can leave this field empty if you don't have an domain name, so simply skip it and click Continue
7) Set name of the user
Note: This is the name of your Device not the username, click Continue once you set your name
8) Create Username
Type your username and proceed to the next step by clicking Continue
9) Set a password
Once you have set your Name and Username for your Device, on this step you need to set a password for your username
10) Choose your Timezone
Select your Timezone
11) Partition Disk
Select Guided - use entire disk and click Continue
Select the HDD that appears on this window and then click Continue
Next select "Finish partitioning and write changes to disk" and click Continue
Now you need to write the changes to the disk, to do this simply Check the Yes box and click Continue
And the Installation of Kali Linux will start, this will take some time depending on your computer's specs.
Wait for the installation to complete and then move to the next step
12) Configure Package Manager
Once the installation has been completed, you'll be prompted to this Window, now you need to select Yes to use a Network mirror because this means it will configure the package manager to receive the latest updates.
Select Yes and click Continue
If you are using a proxy server on your computer then you can put the proxy server in the field shown on the image below, then click Continue.
If you're not using a proxy server then leave this field empty and Click Continue.
And you should see this window, this means the Package manager is being configured
13) Install GRUB boot loader
Next you need to Install the Grub boot loader, select Yes to this window and click Continue, this window will appear once the Package Manager has been configured.
Specify the device where you want to install the Grub boot loader, and click Continue
And the Grub boot loader installation will start
Once Grub boot loader installation finishes, the installation of Kali Linux will start, all you have to do now is to give the setup some time to complete.
14) Installation Completed
Now that the installation has been completed, click Continue to reboot the system so you can start using Kali Linux
15) Login to Kali Linux
Type your username and password, then click the Login button
And , that's it!
Conclusion
By now you should know how to Install Kali Linux on Virtualbox or in other words how to create a VM that runs a full install of Kali Linux, by using the VirtualBox virtualization software.