How to Install Kali Linux 2024 on VirtualBox 6 & 7

This article will set up and configure Kali Linux 2024 on a new virtual machine using the Oracle VM VirtualBox virtualization program. This will enable you to create virtual machines and run and use Windows, Linux, or macOS systems virtually on your Windows 10 64 Bit or Windows 11 operating system computer. Following the stages abstracted in this article, you can start with Kali Linux and begin exploring its many features and capabilities.

Installing Kali Linux 2024 on VirtualBox

How to Set Up Kali Linux 2024 on a New Virtual Machine using Oracle VM VirtualBox on Windows 11 & 10

Kali Linux is a distribution widely preferred by people who want to improve themselves in cybersecurity. This is because it includes various software mainly related to the system and network security for free.

Using this software, users can analyze system security vulnerabilities in their home or corporate network and take measures to ensure information security.

Kali distribution is not only used in the field of cyber security. It can also be preferred over Microsoft’s Windows system on personal computers so users can have multiple powerful tools.

Suppose you find the need for an alternative operating system, like Windows 10, on your Kali PC. In this instance, you can build a dual-boot structure. This will allow you to have both systems on your physical computer. However, switching between them will always require a computer restart.

You can utilize virtualization programs like VMware or VirtualBox on your host machine. This lets you run the preferred active system on a virtual machine without restarting your computer.

How to Create a New VM for Kali Linux

After installing Oracle VM VirtualBox on your Windows 10 computer, you can create a new virtual pc for Kali or other Linux distributions with simple steps.

Step 1

After running the VirtualBox program, click the New icon in the tool menu and open the virtual machine creation wizard. When you type the name of the Linux distribution you will install in the VM wizard, the values in the Type and Version sections are automatically selected.

However, Oracle software may not detect some systems correctly, so you need to adjust some settings yourself. Since the Kali Linux system is Debian-based, change the virtual computer version to Debian (64-bit) and click Next.

Creating a Virtual Machine for Kali Linux

Step 2

Determine a suitable RAM size for your Kali virtual computer depending on the hardware performance of your host computer. If you have a memory size of 8 GB on your host computer, configure the virtual memory size of your VM as 4 GB and click Next.

Setting Virtual RAM Size

Step 3

Since you will install Kali from scratch on the virtual computer you created, check to Create a Virtual Hard Disk Now in the HDD configuration and click the Create button.

Create a New Virtual Hard Disk

Step 4

If you do not run to use your Kali guest machine in any software other than Oracle virtualization software, select the virtual hard disk file type as VDI (VirtualBox Disk Image) and click Next.

Selecting the VDI Virtual Disk Type

Step 5

If you configure the virtual disk of your Kali virtual computer to a Fixed Size, the space equal to the disk size will be allocated from your host disk. This setting improves VM performance but takes up more space on your host disk.

Therefore, select the Dynamically Allocated feature and click Next to configure the space allocation on your host disk as much as the guest operating system will need.

Choosing a Dynamically Expanding Disk Structure

Step 6

If you plan to create a virtual disk backup with a VDI file extension, you can store it on one of your external storage devices. In that case, you can change the disk location in the File Location and Size window.

Suppose you prefer to have the virtual disk backed up to the destination where the VM will be installed. In that case, bypassing the alteration of the file location is recommended. Instead, adjust the disk size to accommodate your system’s requirements for the tasks you perform, and then proceed by clicking the Create button.

Setting Virtual HDD Size

Step 7

After preparing your Kali VM, click Settings to add an ISO file or change the boot order.

Opening the Kali Virtual Machine's Settings

Step 8

In the advanced tab of your virtual computer’s general settings, change the relevant settings to Bidirectional to enable the shared clipboard and drag-and-drop features between your host and VM.

  • Shared Clipboard: Bidirectional
  • Drag’n’Drop: Bidirectional

Enabling Shared Clipboard and Drag and Drop Features

Step 9

Disable Floppy from Boot Order devices in your virtual machine’s System / Motherboard settings and configure the Optical device as primary.

Changing the Boot Sequence

Step 10

Configure the Processor hardware setting of the Kali VM according to the virtual core of your host CPU. The green area indicates that you can select a maximum of 4 cores. Still, you can set a higher value for higher performance.

Increasing the Number of Virtual Processor Cores

Step 11

If you will use applications that require high graphics power in your guest operating system, enable the 3D Acceleration feature in the Display settings and configure the Video Memory size to the maximum value.

Enabling 3D Graphics Acceleration

Step 12

View the Storage hardware settings and delete the old technology IDE Controller.

Deleting IDE Controller

Step 13

Click the Leave Empty button to add an empty optical drive in the Optical Disk Selector window that opens after clicking the icon next to the SATA Controller.

Adding a SATA Optical Drive

Step 14

Enable the Host I/O Cache feature to increase the write and read speed of the SATA controller in your virtual computer.

Enabling Host I/O Cache for SATA Controller

Step 15

To increase the performance of the Kali Linux 2024.vdi virtual disk, configure the SATA Port setting as Solid-State Drive (SSD) in the Attributes tab.

Setting VDI Disk as SSD

Step 16

To add the Kali Linux ISO file to the virtual pc, select the Empty optical disk, then click the CD/DVD icon and click Choose a disk file from the drop-down options.

Adding Kali ISO File to Virtual Machine

Step 17

Select the Kali Linux image file you downloaded to your computer from the link here and click Open.

Choosing Kali Linux ISO File

Step 18

If you want to connect and use your USB 3.x devices in your Kali virtual system, change the Compatibility setting from the USB hardware settings to the USB 3.0 (xHCI) Controller and close the VM wizard.

Enabling USB 3.0/3.1 Controller

Step 19

Click Start to run the Kali Linux virtual computer you prepared with Oracle and start the setup wizard.

Running the Kali Virtual Computer

How to Install Kali Linux in VirtualBox

Once you have successfully created a Linux VM using VirtualBox, running the VM allows you to set up your system like a physical PC effortlessly. Therefore, installing an operating system on a virtual system follows the same stages as setting it up on a PC.

Step 1

Press Enter in the Graphical Install option in the Kali Linux installation wizard.

Kali Linux Installation Wizard

Step 2

When you continue with the graphical installation, select the language in which you will perform the installation process on the Select a Language screen that opens. The language you choose here will also be your system display language.

Selecting the System Language

Step 3

The Location setting, which is generally configured as your country of residence, sets the time zone for your system. Thus, you can display your system time accurately.

Choosing the Location

Step 4

Configure your virtual computer’s keyboard layout according to your host computer’s hardware.

Configuring the Keyboard Layout

Step 5

Type a hostname to identify your Kali virtual machine on your network and continue.

Editing the Hostname

Step 6

If your network environment has an Active Directory server, type your domain name to add your VM to the domain network.

Skipping Domain Name Setting

Step 7

Type your full username for the account that will be used instead of the root account on your Kali system.

Typing a Username

Step 8

Please enter your account name, which will be utilized for logging into your system, using lowercase letters.

Typing the Username in Lowercase

Step 9

Create a solid and hard-to-guess password to prevent anyone else from accessing your virtual system.

Setting Password for User Account

Step 10

If the checklist does not form your time zone, you can change your location by revisiting the setup wizard.

Selecting the Time Zone for the System Clock

Step 11

In the Partition Disks window, you can see the virtual HDDs that you have added to the virtual machine. Choose the virtual disk where you wish to install the Linux system within this window.

Selecting the Disk to Partition

Step 12

You can use different schemes to partition the virtual disk of your choice. If you are an entry-level user of Linux, we recommend continuing with the All Files In One Partition option.

All Files in One Partition

Step 13

After configuring the disk, click Continue to finish the partition process and write the changes to the disk.

Finishing Partitioning and Writing Changes to Disk

Step 14

After checking the changes to be made on the disk, select Yes to confirm writing the changes to the disk and click Continue.

Choosing to Write Changes to Disk

Step 15

After partitioning, select the Kali desktop environment during system setup and continue.

Choosing the Kali Desktop Environment

Step 16

Select the Yes button to install the GRUB Boot Loader on the drive configured as the primary.

Installing GRUB Boot Loader on Primary Drive

Step 17

Select your virtual disk for Boot Loader installation and click Continue.

Choosing the Disk to Install GRUB

Step 18

After installing Kali Linux, remove the installation media and click Continue to boot your system.

System Reboot After Installation

Step 19

Press Enter in the Kali GNU/Linux option on the Kali boot screen.

Kali GNU/Linux

Step 20

Type the username and password you set during installation and click Log In.

System Login

How to Install Guest Additions in Kali Linux VM

After installing Kali Linux with VirtualBox, you must install Guest Additions to install the drivers for your guest operating system and use your host PC’s devices, such as USB and webcam.

Usually, the Guest Additions are installed automatically when your host PC is linked to the Internet while building a guest operating system on the virtual machine. However, if the automatic installation does not occur, you must manually perform this task.

Step 1

While your Kali Linux guest operating system is running, click Devices / Insert Guest Additions CD Image from the tool menu and mount the installation media to the system.

Insert Guest Additions CD Image

Step 2

To start installing, use CTRL + Alt + T to open the command console. Then, execute the following commands to list the contents of the CD image mounted on your system.

cd /media/cdrom
ls
sudo sh ./VBoxLinuxAdditions.run

Installing Guest Additions

Step 3

When you see the Kernel Header 5.18.0-kali5-amd64 error in the terminal while installing Guest Additions, you must install this package and its dependent packages on your system.

Kernel Header 5.18.0-kali5-amd64 Error

Step 4

To get VirtualBox working on Linux, type “sudo apt install build-essential dkms” into the terminal to install the correct kernels.

sudo apt install build-essential dkms

NOTE: If the packages required for Guest Additions cannot be installed automatically using the above command, download and install the relevant packages manually in the terminal.

wget http://http.kali.org/pool/main/l/linux/linux-headers-5.18.0-kali5-amd64_5.18.5-1kali6_amd64.deb | wget http://http.kali.org/pool/main/l/linux/linux-headers-5.18.0-kali5-common_5.18.5-1kali6_all.deb | wget http://http.kali.org/pool/main/l/linux/linux-kbuild-5.18_5.18.5-1kali6_amd64.deb | wget http://http.kali.org/pool/main/l/linux/linux-compiler-gcc-11-x86_5.18.5-1kali6_amd64.deb
sudo dpkg -i *.deb

sudo apt install build-essential dkms

Step 5

The installation process will be successful once you try to install Guest Additions again on your Kali VM.

Guest Additions Installation Successful

Step 6

To check the Guest Additions version, execute the “sudo /usr/sbin/modinfo vboxguest” command in the terminal.

sudo /usr/sbin/modinfo vboxguest

Checking VBoxguest Version

Step 7

Restart your Kali virtual system, and when you try to transfer a file by dragging and dropping a file from your host PC to the desktop environment of your VM, you can see that the file is copyable.

Transferring Files with Drag and Drop

Step 8

You can select whether to use your virtual computer in full-screen or windowed mode.

Controlling the Full Screen Resolution

How to Configure Shared Folder

You can enable and use Oracle software’s Shared Folder feature to quickly copy larger files between your Kali VM and your host.

Step 1

Click Devices / Shared Folders / Shared Folders Settings in the tool menu of your Kali VM.

Configuring Shared Folder

Step 2

In the Shared Folders configuration window, click the add icon as in the image below, and then click Other from the drop-down list in the Add Share window that opens.

Adding a Shared Folder

Step 3

Create a shared folder in a location of your host operating system and change its name as you wish.

Creating Folder on Host

Step 4

After specifying the folder on your host, if you want this folder on your VM to be automatically mounted and permanent every time you restart your system, tick the Auto-Mount and Make Permanent options and click OK.

Auto-Mount and Persist Public Folder

Step 5

Create a new folder in KaliSharedFolder on your host computer’s desktop and check the folder’s contents from Home or media/sf_KaliSharedFolder from your virtual system.

NOTE: If you get a user permission denied error when you try to access sf_KaliSharedFolder, you must make your user account a member of the vboxsf group. To add your user account to the vboxsf group, execute the “sudo adduser $USER vboxsf” command in the terminal and reboot your system.

sudo adduser $USER vboxsf

Testing the Interoperability of Shared Folder

Step 6

You can construct a shortcut on the desktop location to access the shared folder faster.

sudo ln -s /media/sh_KaliSharedFolder ~/Desktop

Creating a Desktop Shortcut for Shared Folder

How to Use USB Flash Memory

Connecting your USB storage devices or flash drives to your Kali guest system lets you do your work, quickly back up your files, or install any software.

Step 1

First, plug your flash disk into one of your physical computer’s free USB 3.x ports and then create a folder named ‘Backup’ to test your disk in the VM.

Creating a Folder Named Backup on a USB Flash Drive

Step 2

Click Devices / USB / Name of Your USB in the tool menu of your Kali VM to connect your USB to the virtual machine.

Connecting USB Stick to Kali VM

Step 3

When you check the contents of your USB memory that is automatically mounted to your Linux system, you can access the folder named Backup.

Viewing the Contents of the USB Disk in the Virtual Machine

How to Delete the Virtual Machine from Kali Linux

Once you have removed all files of the guest system from your PC, it is vital to verify that there is no remaining anything associated with it. You can do this by scanning both the virtual machine library of the Oracle software and the installation location on your host PC.

Step 1

Right-click / Remove the virtual machines listed on the left panel of your Oracle software and click the Delete All Files button in the open window.

Deleting a Kali Linux Virtual Machine

Step 2

After deleting all the files of the guest system from your PC, you can check that there are no files or folders related to the guest operating system both in the virtual machine library of the Oracle software and in the installation location of your host PC.

Checking Systems in Oracle VM VirtualBox Virtual Machine Library

Video

Installing Old Versions

Kali / VBox Versions and Resources
Kali / VBox VersionYouTube VideoSlide
2022.1 / 6.1.32WatchView
2022.3 / 6.1.36Watch

 

Conclusion

As a result, you can install Kali Linux 2024 distribution in a virtual machine with Oracle VM VirtualBox on your Windows 10 & 11 PC. So you can dive into the world of cybersecurity and discover the many features and capabilities of Kali Linux.

In short, you can run Kali as a VM thanks to the steps I have explained professionally in this article. Afterward, you can experience this excellent system in terms of testing, learning, and network security.

Moreover, Kali is a good choice for personal use, cybersecurity training, or professional purposes. So you can improve your skills by using it in a controlled and safe environment.

Add a Comment

Your email address will not be published. Required fields are marked *