How to Install Kali Linux on VirtualBox: A Step-by-Step Guide

Janeta T

Kali Linux is a popular Linux distribution used primarily for penetration testing and cybersecurity research.

Installing it on a virtual machine using VirtualBox allows you to explore and use Kali Linux without altering your primary operating system.

This guide will walk you through the process of installing Kali Linux on VirtualBox step-by-step.

1. Prerequisites

Before you begin, ensure you have the following:

2. Install VirtualBox

If you haven’t already installed VirtualBox, follow these steps:

  • Download the installer for your operating system (Windows, macOS, or Linux) from the VirtualBox website.
  • Run the installer and follow the on-screen instructions to complete the installation.
READ:  Top 5 Photo Editing Apps for Smartphones to Achieve Stunning Results

3. Create a New Virtual Machine

  • Open VirtualBox and click on New.
  • Enter a name for your virtual machine (e.g., “Kali Linux”).
  • Set the Type to “Linux” and the Version to “Debian (64-bit)”.
  • Click Next.

4. Allocate Memory (RAM)

  • Allocate at least 2 GB (2048 MB) of RAM for the virtual machine. For better performance, consider allocating 4 GB or more.
  • Click Next.

5. Create a Virtual Hard Disk

  • Choose Create a virtual hard disk now and click Create.
  • Select VDI (VirtualBox Disk Image) as the hard disk file type and click Next.
  • Choose Dynamically allocated to save space on your physical hard drive, and click Next.
  • Set the disk size to at least 20 GB and choose the location to save the virtual disk.
  • Click Create.

6. Configure the Virtual Machine Settings

  • Select your new virtual machine and click Settings.
  • Go to System > Processor and allocate at least two CPU cores for better performance.
  • Go to Display and increase Video Memory to at least 64 MB.
  • Click OK to save the settings.

7. Attach the Kali Linux ISO

  • Select your virtual machine and click Settings.
  • Go to Storage and click on the Empty disk under the Controller: IDE section.
  • Click on the disk icon next to Optical Drive and select Choose a disk file.
  • Locate and select the Kali Linux ISO file you downloaded.
  • Click OK to attach the ISO.
READ:  How to Install Kali Linux: A Step-by-Step Guide for Beginners

8. Start the Virtual Machine

  • Click Start to boot the virtual machine.
  • The virtual machine will start from the Kali Linux ISO, displaying the boot menu.

9. Install Kali Linux

  • Select Graphical Install from the boot menu and press Enter.
  • Choose your language, location, and keyboard layout.
  • Follow the prompts to configure the network. If you are not connected to the internet, you can skip this step.
  • Enter a hostname for your virtual machine (e.g., “kali”).
  • Set up a new user account by entering a full name, username, and strong password.
  • Select your time zone.

10. Partition the Disk

  • Choose Guided – use entire disk for a simple installation.
  • Select the virtual disk created earlier.
  • Choose All files in one partition.
  • Confirm and choose Finish partitioning and write changes to disk.
  • Select Yes when asked to write the changes to the disk.

11. Install the GRUB Bootloader

  • When prompted, select Yes to install the GRUB bootloader.
  • Choose the disk (typically /dev/sda) where GRUB should be installed.

12. Complete the Installation

  • Once the installation is complete, the installer will prompt you to remove the installation media and reboot the system.
  • Go to Settings > Storage in VirtualBox and remove the Kali Linux ISO from the Optical Drive.
  • Click OK and restart the virtual machine.
READ:  How to Switch from Google Search to ChatGPT Search in Google Chrome and Microsoft Edge

13. Log In to Kali Linux

  • Once Kali Linux boots up, log in with the username and password you created during the installation.
  • You are now ready to use Kali Linux on VirtualBox.

14. Post-Installation Steps

  • Update your system to ensure you have the latest security patches and software updates:

sudo apt update && sudo apt full-upgrade -y

  • Install VirtualBox Guest Additions for better performance, clipboard sharing, and screen resizing:

sudo apt install -y virtualbox-guest-x11

  • Reboot the virtual machine:

sudo reboot

Installing Kali Linux on VirtualBox allows you to explore and experiment with cybersecurity tools in a controlled environment. This setup is perfect for training, testing, and learning without affecting your main operating system. By following this guide, you can quickly and easily get Kali Linux up and running on VirtualBox, setting the stage for your penetration testing and cybersecurity learning journey.

Also Read