Linux / Virtual machines
How to install Kali Linux in VirtualBox safely: complete beginner setup
A virtual machine makes it possible to learn Kali Linux without replacing your daily operating system. This guide uses official Kali images, sensible isolation settings and reversible changes. It is a practical setup checklist, not a claim that every combination of hardware has been tested.
What you need
- A computer that supports hardware virtualization and has adequate free disk space. Leave enough RAM and CPU capacity for the host operating system.
- VirtualBox installed from the official distribution. On a managed or business computer, obtain permission before installation.
- A stable internet connection and a plan to store backups or snapshots.
1. Download the correct Kali image
Visit the official Kali downloads page and choose the Virtual Machines section. Select the VirtualBox image that matches your processor architecture. Prefer a stable release to an unverified third-party download. Check the supplied checksum or signature using the official documentation before opening the archive.
2. Extract and register the VM
Extract the downloaded archive with a supported archive tool. In VirtualBox, choose Machine → Add, locate the extracted machine configuration, and open it. For a separately downloaded installer ISO, create a new Linux VM and install through the graphical installer instead. Keep the prebuilt-image and ISO installation routes separate.
3. Allocate resources carefully
Set a reasonable memory allocation and number of virtual CPUs based on the host capabilities. For a small laptop, start conservatively; if the host becomes slow, power off the VM and reduce the allocations. Store VM files on a drive with enough free space.
4. Choose NAT networking for a beginner lab
NAT is a practical starting point because the guest can often access the internet without being directly exposed as a separate local-network device. Bridged networking may put the guest directly on your LAN; avoid it unless you understand the implications. Neither mode authorizes scanning other devices.
5. Start Kali and secure access
Boot the VM. Official prebuilt Kali images may use documented default credentials; change the password immediately and avoid exposing the VM to the public internet. Set a strong unique password and apply available updates.
6. Take a snapshot before experiments
Use VirtualBox snapshots before major configuration changes. Snapshots can help roll back a broken lab, but they are not substitutes for a backup of important documents and secrets.
7. Update packages
Use the terminal to refresh package metadata and apply available upgrades. Read package-change prompts carefully. If the kernel changes, reboot the VM and confirm networking still works.
8. Diagnose common failures
If VirtualBox reports virtualization unavailable, review the BIOS/UEFI virtualization setting and whether another hypervisor is interfering. If the VM is slow, reduce host contention. If networking fails, verify the adapter is enabled and attached to NAT. If screen resizing fails, consult Kali guest-tool documentation.
Commands to keep handy
Run these only in the context described above. Review each command and understand its effects.
sudo apt update
sudo apt full-upgradeFrequently asked questions
Can I install Kali alongside Windows?
Yes, but a VM is usually easier for beginners because it keeps disk partitioning and bootloader changes out of the initial learning process.
What if the prebuilt VM will not start?
Confirm that you used the correct architecture, that hardware virtualization is enabled, and that your VirtualBox release is compatible. Do not disable security protections blindly.
Can I scan the local network from the VM?
Only when you own or have explicit authorization to test the systems involved. Start with a local training lab.
Official resources
Editorial note: This guide is a general walkthrough. Commands and interfaces may vary by version, system and environment. Review and test changes before relying on them in production.