UnixDroid

Lesson 4 of 10 · 10 min

Install Kali Linux in VirtualBox

Install Kali the fast way (pre-built VirtualBox image) or the learning way (ISO installer), then update it and connect it to LabNet.

Kali Linux is the attacker machine you'll use for the rest of your journey: Nmap, Burp Suite, Metasploit, Wireshark, Hydra and hundreds more tools, ready to go. It's a rolling release: install it once, update it often, and it stays current.

Kali Linux VM recipe card
Kali Linux VM recipe card

Two ways to install it

Option A: Pre-built VM imageOption B: Installer ISO
TimeAbout 5 minutes20–30 minutes
Loginkali / kali (change it!)Your own username and password
Guest AdditionsAlready includedInstalled with one command
You learnVirtualBox basicsHow a Linux installer and partitioning work

Short on time? Choose A. Doing this to learn? Choose B at least once.

Download and verify

Go to kali.org/get-kali:

  • Option A: Virtual Machines → VirtualBox (a .7z file)
  • Option B: Installer Images → Recommended → Installer (an .iso file)

Always check the download's SHA256 hash against the one shown on the download page. It proves the file wasn't corrupted or tampered with, which is a security habit worth having on day one.

# Windows PowerShell (run in your Downloads folder)
Get-FileHash .\kali-linux-*-virtualbox-amd64.7z -Algorithm SHA256
# Linux / macOS
sha256sum kali-linux-*-virtualbox-amd64.7z

Option A: Import the pre-built VM

  1. Extract the .7z with 7-Zip (Windows) or 7z x file.7z (Linux). You get a folder with a .vbox file and a .vdi disk. Put that folder inside your VirtualBox machine folder.
  2. In VirtualBox, choose Machine → Add and select the .vbox file.
  3. Open Settings. Under System, set Base Memory 4096 MB and Processors 2. Under Network, set Adapter 1 = NAT and Adapter 2 = Host-only (LabNet).
  4. Click Start and log in with kali / kali.
  5. Change the password straight away:
passwd

Option B: Install from the ISO

  1. Click New. Name it Kali, choose your Kali ISO, and set Type Linux, Version Debian (64-bit) (VirtualBox often fills this in from the file name). Tick Skip Unattended Installation so you drive the installer yourself.
  2. Hardware: 4096 MB RAM and 2 CPUs. Leave EFI unticked.
  3. Hard disk: 80 GB, VDI, Pre-allocate Full Size unticked. It only grows as you use it.
  4. Before starting, open Settings. Under Display, set Video Memory 128 MB and Graphics Controller VMSVGA. Under Network, set Adapter 1 NAT and Adapter 2 Host-only (LabNet).
  5. Start the VM and choose Graphical install.
Installer screenWhat to choose
Language, location, keyboardYour own (e.g. English · India · American English)
Hostnamekali
Domain nameLeave blank
Full name, username, passwordYour own: a non-root user with sudo
PartitioningGuided – use entire disk → the 80 GB VBOX disk → All files in one partition → Finish → Yes
Software selectionKeep the defaults (Xfce desktop + default tools)
GRUB boot loaderYes, install to /dev/sda

"Use entire disk" only wipes the virtual 80 GB disk you just created. Your real PC is never touched.

When it finishes, the VM reboots into Kali. If it boots back into the installer, go to Devices → Optical Drives and remove the ISO.

First boot checklist (both options)

sudo apt update && sudo apt full-upgrade -y   # bring every package up to date
sudo reboot

If the screen doesn't resize with the window or copy-paste doesn't work, install the VirtualBox guest tools and reboot:

sudo apt install -y virtualbox-guest-x11

Then set Devices → Shared Clipboard → Bidirectional.

Connect to LabNet

ip -br a

You should see eth0 with 10.0.2.15 (NAT) and eth1 with a 192.168.56.1xx address (LabNet). If eth1 has no address:

sudo nmcli device connect eth1
ping -c 3 192.168.56.1

Take your first snapshot

Power the VM off, then choose Machine → Take Snapshot (or open the Snapshots view) and name it clean-install. Whatever you break later, you're one click from a working Kali.

Troubleshooting

ProblemFix
Black screen after loginSettings → Display: VMSVGA, 128 MB, 3D acceleration off
Everything is very slowGreen turtle icon? Revisit the Hyper-V step in lesson 2. Give it 2+ CPUs
"Could not get lock /var/lib/dpkg/lock"Automatic updates are running. Wait a minute and try again
Wrong keyboard layoutsudo dpkg-reconfigure keyboard-configuration
Clipboard not workingBidirectional clipboard + virtualbox-guest-x11 + reboot
Try it yourself
  1. Install Kali using Option A or B (bonus: do both and compare).
  2. Verify the download's SHA256 hash and note whether it matched.
  3. Run cat /etc/os-release and uname -r and record the version and kernel.
  4. Run ip -br a and write Kali's LabNet IP in your lab notebook.
  5. Ping your host: ping -c 3 192.168.56.1
  6. Power off and take a snapshot named clean-install.
No Linux machine? Practise in the free online terminal

Quick check

What is the default username of the pre-built Kali VirtualBox image?

Need a hint?

The password is the same word.

Finished this lesson?

Done lessons keep your daily streak going 🔥

0 day streak

0 lessons done

best 0 days

Log in to keep your streak on every device →