How to Install Kali Linux On VirtualBox (2025) : Complete Guide
Want to explore the world of cybersecurity and penetration testing with Kali Linux? Running it inside a virtual machine using Oracle VirtualBox is a safe and easy way to start. It keeps Kali separate from your main computer system. This guide will walk you through exactly how to install Kali Linux VirtualBox using the latest versions available (including VirtualBox 7.1.8 and Kali Linux 2025.1a as of early 2025). We’ll use simple steps so you can follow along easily.
What You Need Before You Start
Before we begin the process to install Kali Linux VirtualBox, make sure you have these two things:
- Oracle VM VirtualBox: Download the latest version (the steps here work well with version 7.1.8 and newer) suitable for your operating system (Windows, macOS, Linux) from the official VirtualBox website. Install it following their instructions.
- Kali Linux Installer Image (ISO): Download the “Installer” image file (usually 64-bit) from the official Kali Linux download page. This file contains the operating system.
Optional: Some users prefer Kali’s pre-built VirtualBox image for a faster setup. You can find that on the same Kali download page under “Kali Linux Virtual Machines”. This guide focuses on the standard installation using the ISO file, which gives you more control.
Step 1: Create a New Virtual Machine in VirtualBox
First, we need to create a virtual “computer” inside VirtualBox where Kali Linux will live.
- Open Oracle VM VirtualBox Manager.
- Click the “New” button (often a blue star icon).
- Name and Operating System:
- Name: Give your virtual machine a clear name, like “Kali Linux”.
- Folder: Choose where you want to save the virtual machine files (preferably not on your main system drive if space is limited).
- ISO Image: You can select the Kali Linux ISO file you downloaded here, which might pre-fill some settings. Or, leave it as
<not selected>
and we’ll attach it later. - Type: Select
Linux
. - Subtype: Debian
- Version: Select
Debian (64-bit)
(Kali is based on Debian). If you downloaded the Kali ISO earlier, VirtualBox might select this automatically. Click Next.
- Hardware:
- Base Memory: Kali needs at least 2GB (2048 MB) of RAM. However, for better performance, 4GB (4096 MB) or more is recommended if your host computer has enough memory to spare. Use the slider or type in the value.
- Processors: Assign at least 2 CPU cores if possible. More cores generally mean better performance. Click Next.
- Virtual Hard Disk:
- Select
Create a Virtual Hard Disk Now
. - Disk Size: Kali recommends at least 20GB of space. 25GB to 30GB is a safer minimum to allow for tools and updates.
- Ensure the other options are usually fine at their defaults (
VDI
type,Dynamically allocated
). Click Next.
- Select
You’ve now created the virtual machine container!
Step 2: Adjusting VM Settings for Kali Linux Installation in VirtualBox
Before starting the installation, let’s tweak a few settings for better performance.
- Select your newly created “Kali Linux” VM in the main VirtualBox window.
- Click the “Settings” button (often a gear icon).
- Go to System > Processor. Double-check you have assigned at least 2 CPUs if possible.
- Go to Display > Screen. Increase the Video Memory to the maximum possible (usually 128 MB). Enable 3D Acceleration if available (this can sometimes cause issues, but often helps performance).
- Go to Storage.
- Under the “Storage Devices” list, click on the Empty CD icon under “Controller: IDE”.
- On the right side, under “Attributes”, click the small CD icon next to the dropdown.
- Select
Choose a disk file...
- Navigate to and select the Kali Linux ISO file you downloaded earlier.
- Click Open. You should now see the ISO file name next to the CD icon.
- Go to Network. Ensure “Adapter 1” is enabled and set to
NAT
. This is usually the default and allows the VM to access the internet through your host computer easily. (You can explore other modes like Bridged later if needed). - Click OK to save the settings.
Step 3: Starting the Kali Linux Installation in VirtualBox
Now it’s time to boot up the virtual machine and begin the actual Kali installation.
Booting the Installer
- Select your “Kali Linux” VM in the main VirtualBox window.
- Click the “Start” button (green arrow).
- The virtual machine will boot from the ISO file you attached. You’ll see the Kali Linux boot menu.
- Use your keyboard arrow keys to select
Graphical install
and press Enter. (Using the mouse might require clicking inside the VM window first – VirtualBox will often prompt you about capturing the mouse).
Language and Location Settings
- Follow the on-screen prompts to select your preferred language, geographical location (this sets the timezone), and keyboard layout. Click
Continue
after each step.
Network Setup
- Kali will try to detect your network hardware (using the VirtualBox NAT setting).
- Hostname: You can leave this as
kali
or choose a different name for your virtual machine on the network. ClickContinue
. - Domain name: You can usually leave this blank unless you know you need it for a specific network setup. Click
Continue
.
- Hostname: You can leave this as
Creating User Accounts
- Set up your primary user:
- Full name for the new user: Enter your real name or a username. Click
Continue
. - Username for your account: This will be your login name (e.g.,
kali
or your choice – keep it simple and lowercase). ClickContinue
. - Choose a password: Enter a strong password for your user account.
- Re-enter password: Confirm your password. Click
Continue
.
- Full name for the new user: Enter your real name or a username. Click
Partitioning the Virtual Disk
- Configure how Kali will use the virtual hard disk. This is a crucial step.
- Choose
Guided - use entire disk
. This is the simplest option for a virtual machine where Kali is the only OS. ClickContinue
. - Select the virtual disk offered (it should be the only one listed, labelled VBOX HARDDISK). Click
Continue
. - For partitioning scheme,
All files in one partition (recommended for new users)
is the easiest choice. ClickContinue
. - Review the proposed partitioning. Select
Finish partitioning and write changes to disk
. ClickContinue
. - Confirm the changes: Select
Yes
when asked “Write the changes to disks?”. ClickContinue
.
- Choose
Installing the System Base
- Kali will now copy its core files to the virtual hard disk. This is the main installation phase and will take some time.
Software Selection
- Choose the desktop environment and tools you want installed:
- The defaults (XFCE desktop,
kali-desktop-default
, and the default recommended tools) are a good starting point. You can install more tools later. - Ensure the options you want are checked (use the spacebar to check/uncheck if needed). Click
Continue
.
- The defaults (XFCE desktop,
Installing the Boot Loader (GRUB)
- The GRUB boot loader makes the system start correctly.
- Select
Yes
when asked to install the GRUB boot loader to the master boot record. ClickContinue
. - Choose the virtual disk device for boot loader installation. It should be
/dev/sda
(the VBOX HARDDISK). ClickContinue
.
- Select
Finalizing Installation
- Kali will complete the final setup steps. Once done, you’ll see a message saying “Installation complete”. Click
Continue
. The VM will automatically try to reboot.
Step 4: First Boot and Post-Installation
- Remove Installation Media: VirtualBox should automatically disconnect the ISO file after installation. If Kali boots back into the installer menu, you need to manually remove it. Shut down the VM (choose “Power off the machine”). Go back to VM Settings > Storage, click the Kali ISO file under Controller: IDE, click the CD icon on the right, and select
Remove Disk from Virtual Drive
. Click OK and restart the VM. - Login: Once Kali Linux boots up, you’ll see a login screen. Enter the username and password you created during the installation.
- Install VirtualBox Guest Additions (Highly Recommended): Guest Additions provide better integration between your host computer and the Kali VM (like better screen resolution, shared clipboard, shared folders).
- Inside your running Kali VM, open a Terminal window.
- First, update your package list and upgrade existing packages:
sudo apt update
sudo apt full-upgrade -y - Install required headers and tools:
sudo apt install -y build-essential dkms linux-headers-$(uname -r)
- From the VirtualBox VM window menu, go to Devices > Insert Guest Additions CD image….
- Kali might ask if you want to automatically run the software on the CD. If it does, click
Run
. If not, a CD icon might appear on your desktop or in the file manager. Open it, right-click in the empty space inside the folder, choose “Open Terminal Here” (or navigate to the mounted directory in your existing terminal, often/media/cdrom0
), and run:sudo sh ./VBoxLinuxAdditions.run
- Follow any prompts in the terminal. Once it finishes, reboot the VM for the changes to take effect:
sudo reboot
- Update Kali (Optional but Recommended): Even if you upgraded during the Guest Additions install, it’s good practice to check again after rebooting, especially if some time has passed. Open a terminal and run:
sudo apt update && sudo apt full-upgrade -y
VirtualBox is a fantastic tool for trying out different systems; if you'd like to explore the popular Ubuntu distribution, check out this guide on how to install Ubuntu on VirtualBox.
Conclusion
Congratulations! You have successfully managed to install Kali Linux VirtualBox. You now have a powerful penetration testing and security auditing platform running safely inside a virtual machine on your computer. Remember to keep Kali updated regularly and explore the vast array of tools it offers responsibly and ethically. Enjoy your journey into cybersecurity!