Install Kali Linux in Oracle's Virtual Box
Tags: linux, virtualbox, kali, beginners
Published: 2022-11-28 22:50:06

The thought of having to install and setup your Kali Linux operating system using Virtualization software might seem daunting at first, especially when you are new to the use of Linux in a virtual system. If this your first time, you will need a clear and simple guide, because any mistake in the installation and setup might cause the software to malfunction. 

This blog covers the step by step guide on how to download and install Kali Linux Operating System in your Oracle VirtualBox.

## Introduction to Linux

Linux is an open source Operating System (OS). An OS is a system software that manages all of the software and hardware on the computer. Most of the time, several different computer programs could be running at the same time, and they all need to access your computer's central processing unit (CPU), memory, and storage. The operating system coordinates all of this to make sure each program gets what it needs.

The term open source means that the source code is available to anyone and can be modified and distributed by anyone around the world. So this makes the Linux Operating system available in different versions. These versions are called distributions (or, in the short form, “distros''). You get to choose a distro depending on what you want to achieve.

Nearly every distribution of Linux can be downloaded for free, burned onto disk (or USB thumb drive), and installed (on as many machines as you like).

__Popular Linux distributions include:__

- LINUX MINT
- MANJARO
- DEBIAN
- UBUNTU
- ANTERGOS
- SOLUS

Kali Linux is a Debian-derived Linux distribution designed for digital forensics and penetration testing. It is maintained and funded by Offensive Security.

Kali Linux is mainly used for advanced Penetration Testing and Security Auditing. Kali contains several hundred tools which are geared towards various information security tasks, such as Penetration Testing, Security research, Computer Forensics and Reverse Engineering.

## Download Kali Linux Image


First, you will need to download Kali Linux to your computer. You can download Kali from [here](https://www.kali.org/)

On the home page, click the __Downloads__ link at the top section of the page. On the downloads page get to the Installer Images section. You can choose between the options of Kali for 64bit or 32bit processor. 
To determine the processor type on your computer go to __Control Panel > System and Security > System__

You have the choice of downloading directly or via torrent. If you click the download icon, Kali will download directly to your system , and will be placed on your download folder. The torrent download option is the peer-to-peer download used by many file-sharing sites. You will need BitTorrent for this. The Kali file will then be downloaded to the folder that the torrent application stores its downloads.


![Kali Download Page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hvxo85cmb36psdfx91xm.PNG)


## What is Virtual Machine

A Virtual Machine is a software that allows you to run multiple operating systems on your computer without affecting your computer’s operating system. This means that you can have a Windows or Mac OS computer and still be able to run a virtual machine of Kali Linux inside that operating system. You don't need to overwrite your existing OS.
Many virtual machine options are available, but here you will get to see how to download and install Oracle’s free VirtualBox


## Download & Installation of VirtualBox


You can download VirtualBox [here](https://www.virtualbox.org/)

Then click __Downloads__ on the Downloads page and select the VirtualBox package for your current operating system, make sure you download the latest version.


![virtualbox download page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zqr48bmwxia8z72rpp4b.PNG)

When the download is completed, click the setup file and it opens up to the setup wizard. Click __Next__ and you should see a Custom Setup Screen. From this Screen, simply click __Next__. Keep clicking __Next__ until you get to the network interfaces screen warning and then click __Yes__.
Click __install__ to begin the process. When the installation is complete, click __Finish__.

## Setup of VirtualBox

Your VirtualBox should be open once it's installed. If not, open it and you should see the VirtualBox Manager. Since you will be creating a new virtual machine with Kali Linux. 

- Click __New__ in the upper right corner. This opens a Create a Virtual Machine dialog. Give your machine a name, You can call it “Kali”. 
- Select __Linux__ from the Type drop-down menu. Then select __Debian(64-bit)__ from the Version on the menu unless you are using the 32-bit version of Kali, then you will need to select Debian(32-bit).
- Click on __Next__, You will see a small screen where you will need to select how much RAM you want to allocate to this virtual machine.

It is advisable to use just 25% of your total system’s RAM. That means if you have 4GB on your physical system then select just 1GB for your virtual machine. If you have 16GB on your physical system then select 4GB for your virtual machine and so on.


![creating vm](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ci5500map6hg9z0la1hg.PNG)

- Click on __Next__ and you will get to the Hard Disk Screen. Choose __create Virtual HardDisk__ and click __Create__, then on the next Screen select __Virtual HardDisk (VHD)__ out of the other options. 
- On the next screen select __Dynamically Allocated__ as you want the space on the virtual hard drive to be available until it's needed.
Click on __Next__ and you will choose the amount of hard drive space to allocate to the VM and the location of the VM.
The default is 8GB, but it's recommended that you allocate 20 - 25GB at least. 

Remember if you choose to dynamically allocate hard drive space, it won’t use the space until needed. This is better than having to expand your hard drive after it has already been allocated.
Click on __Create__ and you're ready to go!


## Installing Kali on the Virtual Box


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9mekvxk5yclvmuq25s8y.PNG)

At this time, you should see a screen like this and the indication that the Kali VM is powered off. 

- To install the Kali, first click the Start button (The green icon).
The VirtualBox will ask where to find the startup disk. You should have already downloaded the Kali Linux disk image with the extension *.iso* following the steps outlined above.
It should be located in your Downloads folder, unless you used torrent to download then it should be in the downloads folder of your torrent application.
Click the folder icon to the right, navigate to the downloads folder and select the Kali image file. Then click __Start__. 

__Congratulations, you have just installed Kali Linux on a virtual machine!__

If you get an error while installing Kali into your VirtualBox, then it's likely because you don't have virtualization enabled in your system’s BIOS. Each system and its BIOS is slightly different so it's best you make a quick search online to get virtualization enabled in your system or to shut down any other competing virtualization software.

## Setting Up Kali

Kali will now open a screen showing you several startup choices. Graphical Install is ideal for beginners, because it gives you Desktop access instead of just the terminal. You should select __graphical install__, use your keyboard keys to navigate the menu.

- You will be asked to select Language, ensure you select a language that you will be comfortable working with then click __Continue__. Next select your location and click __Continue__ and then select the keyboard layout based on your preference.
- The setup will now probe your network interfaces, and next the screen prompts you to enter a hostname for your system. You can name it anything you want or leave the default “kali”
- Next you will be asked to provide a Domain name, this is optional, so you can click __Continue__ to skip.
- Next you will need to create the user account for the system (Full name, username and a strong password).
- Next you will need to set your Time Zone.
- After this, you will need to choose from the partition disks options. Choose __Guided - use entire disk__, and Kali will detect your hard drives and set up a partitioner automatically.
- Next click __Continue__ to select the disk to be partitioned and ignore the warning from Kali that states that all the data on the disk will be erased because the disk is new and empty, so it won't erase anything.
- Depending on your needs, you can choose to keep all your files in a single partition or to have separate partitions for one or more of the top-level directories. For beginners it's recommended that you choose a single partition, so simply select __All files in one partition__.
- Next you will have the chance to go through your options on disk configuration once again, once satisfied, click __Yes and Continue__.

Kali will now begin installing the operating system, this could take a while.
- Once completely installed, you will be prompted to enter proxy information, you can leave it blank and click __Continue__.
- Next, on the software selection screen, click __Continue__ as the default selections have already been made.
- Next confirm to install the GRUB boot loader, you will be prompted to choose whether you want to install the GRUB bootloader automatically or manually, select __Enter Device Manually__ then select the available hard drive for the installation and click __Continue__.
- Click to the next screen and you should see that the installation is completed.
 
__Congratulations you have successfully installed and completed the set up of Kali Linux on your Virtual Machine!__

Kali will attempt to reboot and after a little while you should see Kali’s login screen, enter your Username and Password.
After logging in you should see the Kali Linux Desktop screen!


![kali running](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ikilcs8jjaer1fwybq68.PNG)

## Conclusion

Now, you have a virtual machine running a Linux OS within your host OS. You can now choose to learn the basic commands in Linux and play around with it a bit. 

I hope you found this article helpful. Kindly let me know what you think as this is my first tech article.

Cheers!