How to install Kali Linux in Virtual Box? - Cyvoryn

Learn Completely Step By Step How to Install Kali Linux in Virtual Box?

Kali Linux in VirtualBox is convenient for learning Kali and using Kali without removing Linux or Windows as the primary operating system of a computer. VirtualBox provides a virtual computer within the computer, allowing Kali to run as a guest system. Kali's documentation notes that a virtual machine isolates Kali from the host computer and also allows snapshots in case of failure.

This guide explains the reasons why we install Kali Linux in VirtualBox and provides a step-by-step installation process for the beginner.

Why we install Kali Linux in Virtual Box?

Installing Kali Linux in VirtualBox has a number of advantages. We can use Kali while keeping either Windows, Linux, or any other operating system as the primary operating system. The virtual machine isolates Kali, making it suitable for learning, testing, and experimenting.

One other advantage is that of flexibility: we can start or shut down Kali whenever needed without restarting the computer. VirtualBox also allows snapshots, which lets us save a Kali state and restore the state at a later point in time.

Step 1: Checking the computer specifications

Before installing Kali Linux in VirtualBox, it is critical to ensure that the computer has enough RAM, storage space, and CPU capacity. Hardware virtualization may need to be enabled in the BIOS/UEFI of the computer. Kali's VirtualBox documentation specifically mentions that virtualization such as Intel VT-x and AMD-V may need to be enabled.

It is also good to have several gigabytes of free storage space as the virtual disk and Kali installation will consume space.

Step 2: Download VirtualBox

Download and install the latest VirtualBox appropriate for the host operating system. Complete the normal installation process and launch VirtualBox.

VirtualBox is commonly used for running multiple operating systems as virtual machines, including Kali Linux.

Step 3: Download Kali Linux

Download Kali Linux from its official website. For this installation method, download the Kali Linux Installer ISO appropriate for the architecture of the computer.

It is always good to obtain the ISO from an official Kali source rather than a random unknown website.

Step 4: Open VirtualBox

Open VirtualBox and select New to create a new virtual machine. Kali's documentation uses this approach in its VirtualBox documentation.

Give the new virtual machine a name such as:

Kali Linux

For the operating system type, select Linux. For a 64-bit Kali installation, select Debian (64-bit) as Kali's documentation demonstrates.

Step 5: Allocation of memory

Select how much RAM to allocate to the virtual machine. Kali's documentation uses 2 GB of RAM, but one can allocate more RAM when there is enough memory available in the computer.

Do not allocate almost all of one's RAM to Kali because the host computer also needs memory.

Step 6: Create virtual hard disk

Select Create a new virtual hard disk now.

For the disk format, select VDI (VirtualBox Disk Image). Then choose Dynamically allocated so that the virtual disk can expand as data is added to it rather than taking up its maximum size right away.

Kali's documentation uses an 80 GB virtual disk, but the right size depends on the available storage and the intended use.

Step 7: Changing virtual machine settings

After installing the VM, select it and open Settings.

Under System → Processor, Kali's documentation uses two processors as an example. In Display, it uses 128 MB of video memory and recommends that 3D acceleration should be turned off since users have reported issues with it.

These settings are changeable but depend on the hardware of the computer.

Step 8: Attach ISO

Start the Kali virtual machine. VirtualBox will ask for a startup disk. Select the optical-disk option, choose Add, and locate the ISO that one has downloaded and select it. Then, choose the ISO as a startup disk.

Step 9: Start installation of Kali Linux

Kali's installation menu will come up. Select the graphical installation option if one prefers a simple visual installation process.

Follow the instructions of the installer for the language, location, keyboard, hostname, user account, password, and disk configuration.

Because it is a virtual machine, the installer interacts with the virtual disk that one has created rather than directly modifying one's computer's physical operating-system installation.

Step 10: Configure virtual disk

When the installer asks about partitioning, beginners can generally use the guided partitioning option for the virtual disk.

Carefully confirm that the disk that one has selected is the virtual disk that one has created for Kali. Do not accidentally select a physical disk that contains important data.

Continue through the installer and allow Kali to copy the required files.

Step 11: Installing bootloader

During installation, Kali may ask whether one wants to install the GRUB bootloader. For normal virtual-machine installation, install the bootloader to the virtual machine's disk when prompted.

The installer then completes the remaining configuration.

Step 12: Reboot Kali Linux

After the installation procedure, reboot the virtual machine. If prompted by VirtualBox to remove the installation media, allow the system to boot from the virtual hard disk.

Kali Linux virtual machine should now be open within VirtualBox.

Step 13: Log In and Update Kali

Log in using the user account created during installation. Then proceed to update the system by opening the terminal and typing in the following commands:

sudo apt update

sudo apt full-upgrade -y

This ensures that Kali Linux has the latest system packages and security updates.

Step 14: Install or Check Guest Tools

The official documentation states that Kali Linux is designed to be able to detect whether it is running in a virtual machine. Therefore, the installation procedure should automatically install additional VirtualBox tools that enhance the user experience by improving the mouse pointer behavior and display resolution.

In case this procedure fails, Kali provides an option to manually reinstall the guest tools by typing in the following commands.

sudo apt update

sudo apt install -y --reinstall virtualbox-guest-x11

sudo reboot -f

Step 15: Take a Snapshot

Finally, take a snapshot of the VirtualBox. This will enable a user to restore the virtual machine to its current state if any of the subsequent procedures fail. It is important to mention that Kali Linux specifically recommends taking snapshots as one of the advantages of running applications in a virtual machine.

Conclusion

The process of installing Kali Linux onto VirtualBox is ideal for novice users who wish to learn and practice Linux command-line operations and cybersecurity tools without endangering their personal computers. The whole process entails installing VirtualBox, downloading the official ISO file, and creating a Debian-based virtual machine. The next step is to assign appropriate amounts of random-access memory (RAM) and hard disk space to the virtual machine as well as attaching the downloaded ISO file as an installation disc. Finally, the user should complete the installation process by running the setup wizard, configuring the guest tools, updating the system, and taking a snapshot of the virtual machine.

VirtualBox makes Kali Linux versatile and convenient because it allows running applications alongside the host system and taking snapshots of the virtual machine’s state. However, it is recommended that users only utilize Kali Linux and its tools on authorized systems and networks to ensure legality and safety.

Comments

Popular Posts