How to Install Kali Linux in VirtualBox or VMware
Kali Linux, a popular penetration testing and ethical hacking operating system, can be run in a virtual environment using software like VirtualBox or VMware. Running Kali Linux virtually ensures you can experiment without affecting your host system. Here’s a step-by-step guide to installing Kali Linux in VirtualBox or VMware.
Requirements
Before you begin, ensure you have the following:
- System Requirements: At least 4 GB RAM (8 GB recommended), 20 GB of free disk space, and a modern CPU with virtualization support.
- Virtualization Software: Download and install either VirtualBox or VMware Workstation Player.
- Kali Linux ISO or VM Image: Download the ISO file or the pre-built VM image from the Kali Linux official website.
Install VirtualBox or VMware
VirtualBox:
- Download VirtualBox from the official website and install it.
- During installation, allow VirtualBox to install network adapters if prompted.
VMware:
- Download VMware Workstation Player from its official site.
- Install the software and follow the on-screen instructions.
Create a New Virtual Machine
For VirtualBox:
- Open VirtualBox and click on New.
- Enter the name of your virtual machine (e.g., “Kali Linux”).
- Type: Linux
- Version: Debian (64-bit)
- Allocate RAM. Recommended: 2048 MB (2 GB) or more.
- Create a virtual hard disk.
- Choose VDI (VirtualBox Disk Image).
- Dynamically allocated storage is recommended.
- Set a size of at least 20 GB.
For VMware:
- Open VMware Workstation Player and select Create a New Virtual Machine.
- Choose the Kali Linux ISO or VM image downloaded earlier.
- Allocate RAM (at least 2 GB) and assign the number of processors/cores.
- Specify disk size (20 GB or more) and choose whether to store the virtual disk as a single file or split it into multiple files.
Configure the Virtual Machine
For VirtualBox:
- Go to the Settings of your virtual machine.
- Under System > Processor, enable PAE/NX and allocate 2 or more cores if possible.
- Under Storage, add the Kali Linux ISO file by clicking on the Empty Disk and selecting Choose a disk file.
- Under Network, select NAT or Bridged Adapter for internet access.
For VMware:
- In the virtual machine settings, ensure the ISO file is connected as the CD/DVD drive.
- Under the Processor and Memory sections, allocate sufficient resources.
- Set the network connection to NAT or Bridged as required.
Boot and Install Kali Linux
- Start the virtual machine.
- When prompted, choose the Graphical Install option.
- Follow the on-screen installation steps:
- Select your language, region, and keyboard layout.
- Configure the hostname and domain name (optional).
- Create a user account and password.
- Partition the disk. Choose Guided – use entire disk for simplicity.
- Proceed with the installation and wait for it to complete.
Post-Installation Setup
- Remove the installation ISO:
- In VirtualBox, go to Settings > Storage and remove the ISO file.
- In VMware, disconnect the ISO from the virtual CD/DVD drive.
- Restart your virtual machine.
- Update your system:
sudo apt update && sudo apt upgrade -y
Optional: Install VMware Tools or VirtualBox Guest Additions
These tools improve performance, resolution, and device compatibility.
For VirtualBox:
- Go to Devices > Insert Guest Additions CD Image.
- Run the installation script inside the virtual machine.
For VMware:
- Install VMware Tools by selecting the option in the VMware Player menu.
- Follow the instructions inside Kali Linux to complete the installation.
Final Checks
- Test your internet connection and tools like ping or browser access.
- Ensure your Kali Linux virtual machine is working smoothly.