There are multiple ways of installing a Kali Linux. One way is Installing Kali Linux on hard disk. Other way is installing Kali Linux as a virtual machine. If the virtual machine is corrupted or deleted, it will not affect the functionality of main operating system.
For installing Kali Linux on virtual machine, first step is to Download and Install Oracle Virtual Box. Then download the virtual box image of Kali Linux and verify the integrity and authenticity of Kali Linux ISO image.
Now create a new Virtual Machine by clicking on tools and then click on New in Oracle VM VirtualBox Manager.
Then provide the name of the Virtual Machine and choose the operating system type such as Linux and choose the Version “Debian (64-bit)”.
Choose the memory size, which is allocated to the virtual machine. It’s better to choose 2GB of memory, otherwise virtual machine could be slow or laggy.
Add a virtual hard disk to the new machine. Choose “Create a virtual hard disk now” and click on Create.
Then choose the hard disk file type. Leave the default setting “VDI (VirtualBox Disk Image)” as it is.
Then choose the storage on physical hard disk. Choose “Dynamically allocated” option.
Now select the file location of the new virtual hard disk and select the size of the virtual hard disk. I am giving 20 GB hard disk space to the Virtual Machine and click on Create button.
You will see new virtual machine is created at the left side of Oracle Virtual Box with the name “Kali Linux”
Before installing Kali Linux, modify some settings of newly created virtual machine named “Kali Linux”. Click on Kali Linux, then click on Settings.
Now modify System settings, then click on Processor tab and give two cores to the virtual machine. It depends that how much resources do you have. Giving more cores to the virtual machine is better.
If you have high resolution screen and using virtual box 6 then click on Display and set the Scale Factor to 200%. This will increase the size of your virtual machine.
Then modify the Network settings and choose the “NAT Network”. This setting will create a virtual network, where your host machine will be the router of your virtual machines. And all the virtual machines will be the client of your host machine and they will access internet through the host machine. At the same same, all the virtual machines will also be able to communicate with each other and connected to the same network.
Now start the virtual machine by clicking on Kali Linux virtual machine and click on Start.
Now choose the iso file which you downloaded from Kali Linux Official Website and then click on Start button.
Kali Linux installer menu will be shown on the screen. Choose Graphical install and Kali Linux installation process will be started. Rest of the installation process will remain the same which is used for the installation on hard disk. For the rest of steps follow How to Install Kali Linux on Hard Disk”