HENAKAB.

← All guides

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

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-upgrade

Frequently 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

Explore more Henakab Knowledge Hub guides

Practical verification and recovery checklist

Use these steps on a virtual machine you own or have permission to administer. The commands below are reference procedures, not results claimed to have been tested by Henakab. Confirm the installed Kali and VirtualBox versions before following instructions.

Record the environment before making changes

cat /etc/os-release
uname -r
ip -br address
ip route

Record the Kali version, kernel, VirtualBox host version, whether the adapter is NAT or bridged, assigned IP address, and default gateway. For a beginner lab, NAT is usually sufficient for outbound Internet access and reduces the chance of exposing the VM directly to the local network.

Diagnose networking one layer at a time

  1. In VirtualBox settings, verify that the virtual adapter is enabled and its cable-connected option is selected.
  2. Inside Kali, run ip -br address. An interface without an IPv4 address may indicate a disconnected adapter or failed DHCP allocation.
  3. Run ip route. If no default route exists, inspect the VM network mode and DHCP configuration.
  4. Try ping -c 3 1.1.1.1 to check IP connectivity, then getent hosts example.com to check DNS separately. A reachable IP with failed name resolution points toward DNS rather than a complete network outage.

Do not disable the host firewall or lower security settings simply to make a VM connect. If you change the network adapter type, note the previous setting so it can be restored.

Guest Additions and shared folders

Use your installed VirtualBox version's documentation to select the appropriate Guest Additions method. Check whether the guest modules are loaded using lsmod | grep -E 'vboxguest|vboxsf'. If an auto-mounted shared folder is inaccessible, inspect id and the folder's group ownership. Membership changes to vboxsf may require a new login; do not grant broad file permissions as a shortcut.

Snapshot restore procedure

  1. Before changing drivers or Guest Additions, shut down the guest cleanly and create a named snapshot, such as “before-guest-additions”.
  2. Record what you changed and verify the guest boots and networking still works.
  3. If testing fails, use VirtualBox's snapshot manager to restore the recorded state. Save important documents outside the VM first, because restoring a snapshot can discard subsequent guest changes.

Official VirtualBox Guest Additions documentation