Skip to content
Tutorials Center
My learning

Topics

Lesson 4 of 31 ยท The Kali Environment

Installing and Updating Kali

Learn the ways to run Kali Linux (ISO, VM image, live USB, WSL), how to verify downloads, and how apt update, full-upgrade and metapackages work.

There is more than one way to get Kali running, and the best choice depends on what you want to do. A virtual machine suits most learners. A live USB suits quick, traceless sessions. WSL suits Windows users who mostly want command-line tools. Installing on bare metal suits people who need direct hardware access, for example to wireless adapters.

Whichever way you choose, two habits matter from the first minute: verify what you download, and keep the system updated. Kali is a rolling distribution, so updates are frequent and tools change quickly. All commands in this lesson are read-only on this site because they need a real Kali system; the Python stand-ins model the package logic.

Ways to run Kali

Four ways to run Kali

Virtual machine Pre-built image or ISO in a hypervisor. Best for learning.
Live USB Boot from a stick. Nothing is saved unless you add persistence.
WSL Kali inside Windows. Great for CLI tools, limited for hardware.
Bare metal Installed on a disk. Needed for direct hardware access.

For a first lab, use a VM.

1 / 2
  • Pre-built VM images (for VirtualBox and VMware) are the fastest start: download, import, boot. They come with sensible defaults.
  • Installer ISO gives you a standard Debian-style installer where you choose disk layout, encryption and the tool selection.
  • Live image runs from a USB stick or DVD. It is useful for rescue and for sessions that must leave nothing behind.
  • WSL (Windows Subsystem for Linux) runs Kali userland tools on Windows 10 and 11. It is convenient for scripts and many tools, but raw network and wireless features are limited.

Many cloud providers and ARM boards (such as Raspberry Pi) also have images, but a local VM is the best place to start.

Verify the download

Download Kali only from the official site. Then check the file's checksum so you know it was not corrupted or tampered with. The project publishes SHA-256 sums, and the sums file itself is signed.

Terminal
# Read-only here: run these on your own computer after downloading
sha256sum kali-linux-*-installer-amd64.iso
# compare the result with the value on the official downloads page

# stronger: verify the signed checksum list with GPG
gpg --verify SHA256SUMS.gpg SHA256SUMS
sha256sum -c SHA256SUMS --ignore-missing

A matching hash tells you the file is what the publisher intended, provided you got the expected hash from a trustworthy place. That is why the signature check matters: it protects the hash list too. Chapter 6 of this tutorial returns to hashing in depth (Password Storage and Hashing).

First boot

Current Kali releases do not ship a shared default login that you should keep. The installer asks you to create a normal user, and you work as that user, using sudo for administrative tasks. Older guides that say "log in as root" are out of date. Working as root all day makes every typo more dangerous.

Useful first steps:

Terminal
sudo apt update
sudo apt full-upgrade -y
sudo reboot
# after reboot, confirm the release
cat /etc/os-release
uname -r

Then take a VM snapshot named "fresh and updated" (see Building a Safe Lab).

apt: update, upgrade and full-upgrade

Kali uses apt, exactly like Debian. These three commands are easy to mix up:

Command What it does
apt update Downloads the latest package lists from the repositories. Installs nothing.
apt upgrade Installs newer versions of installed packages, but never removes packages or installs new dependencies that need removal.
apt full-upgrade Like upgrade, but may install new packages and remove obsolete ones to complete the upgrade.

On a rolling release, dependencies change often, so the recommended routine is update followed by full-upgrade. Do it regularly, and always before a new piece of work. Never mix Kali with repositories from other distributions; that is a classic way to break a system.

Terminal
sudo apt update
apt list --upgradable          # preview what would change
sudo apt full-upgrade
sudo apt autoremove --purge    # clean up packages no longer needed

If you are not yet comfortable with services and packages, read Packages and services in the Linux tutorial first.

Metapackages: choosing your toolbox

Kali has thousands of tools, so it groups them into metapackages: empty packages whose only job is to depend on a list of others. Installing one pulls in the whole set.

Metapackage Purpose
kali-linux-default The standard tool set shipped in the normal installer.
kali-linux-headless Same idea without graphical tools; good for servers and WSL.
kali-linux-large Default plus many extra tools.
kali-linux-everything Every tool in the archive. Very large.
kali-tools-web, kali-tools-wireless, ... A single category of tools.
Terminal
apt-cache depends kali-linux-headless | head
sudo apt install kali-tools-web
apt show kali-tools-top10

Prefer installing the category you need over "everything." More tools mean more disk, more updates and more things to keep patched.

Stand-in: comparing package lists

A common maintenance task is asking "what is on this machine that is not on that one?" You do this with dpkg --get-selections or apt list --installed plus diff. Here is the same logic in Python on sample lists, so you can see how a metapackage selection differs from what is installed.

Python Compare two package lists

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Set operations (-, &) are exactly what comm and diff do on sorted lists.

Stand-in: simulating apt update and full-upgrade

This stand-in models a tiny repository. update refreshes the version list, and full-upgrade installs newer versions. Package names and versions are invented.

Python A tiny model of update and upgrade

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Notice that before update the machine thinks nothing is upgradable. It only learns about new versions after the package list is refreshed. This is why you always run apt update first.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What does apt update do?

    apt update only downloads the package index. Installing newer versions is the job of upgrade or full-upgrade.
  2. 2. Why is full-upgrade recommended on a rolling release?

    Rolling releases change dependencies often. full-upgrade is allowed to install or remove packages to complete the upgrade.
  3. 3. Which metapackage is the best fit for Kali inside WSL where you have no graphical desktop?

    kali-linux-headless gives the command-line tool set without graphical dependencies.
  4. 4. Why verify a downloaded ISO with a checksum and signature?

    A checksum detects corruption and tampering, and the signature protects the checksum list itself.

Summary

  • Choose a VM for learning, a live USB for temporary sessions, WSL for command-line tools, bare metal for hardware access.
  • Download only from the official site and verify the checksum and signature.
  • Work as a normal user with sudo, not as root all day.
  • Use apt update then apt full-upgrade regularly; do not mix in other distributions' repositories.
  • Metapackages install curated tool sets; prefer only the categories you need.
  • Snapshot a clean, updated VM before you start experimenting.

Next up: Command Line Essentials for Security Work.