How do I update Kali Linux? Step-by-step guide for detailed operation

Kali Linux update tutorial is introduced

How is Kali Linux updated? Kali Linux is known as one of the best operating systems for penetration testing. It is a Linux distribution originating from Debian with a large community of users.

The operating system follows a rolling release model, with new releases about four times a year. Make sure to check for updates and upgrades regularly. Doing so improves overall security and speeds up system performance.

In this article, you’ll learn how to update Kali Linux.

prerequisite

  • A system running Kali Linux (preferably Kali installed as a VM)
  • Access the terminal window/command line (Ctrl + Alt + T.) )
  • A user account with sudo or root privileges

How do I update Kali Linux?

Kali Linux Update Tutorial: Kali uses the Debian package management system, which allows you to update and upgrade using apt or apt-get commands. Follow the steps listed below to update and upgrade Kali.

Step 1: Check the source list file

When downloading updates using APT Package Manager, make sure that the system is connected to the correct remote repository. The configuration files /etc/apt/source.list and /etc/apt/source.list.d/ contain the URLs from which Kali installs packages and applications.

Open the configuration file to view the source code:

cat /etc/apt/source.list

The output should show deb http://http.kali.org/kali kali-rolling main contrib non-free URL as shown in the image below.

The same applies to files in /etc/apt/source.list.d/.

Step 2: Update the package manager

How do I update Kali Linux? Before installing the latest software, you need to update the package repository to make sure you are downloading the latest version. Run the following command to get the latest list of packages:

apt update

Note: Kali has a default root user on versions prior to 2020.1. As more and more users started using Kali as their daily operating system, they decided to move to a traditional security model that used non-root users. The default password for the root user is toor. If you’re not logged in as root, make sure to add the Linux sudo command prefix.

Step 3: Upgrade your system

How is Kali Linux updated? Now you can run the upgrade, which will install the latest packages and patches for Kali Linux. There are three commands you can use to upgrade Kali:

  • apt upgrade
  • apt full-upgrade
  • apt dist-upgrade

There are subtle differences between them:

  • The apt upgrade command downloads and updates the package without deleting anything previously installed on the Kali Linux system.
  • The apt full-upgrade command downloads and updates the package. However, it also removes installed packages if needed.
  • The apt dist-upgrade command is the same as a regular upgrade, while intelligently handling changing dependencies, removing obsolete packages, and adding new ones.

Once you’ve decided how to upgrade, enter the command and press Enter. You will be asked to confirm the installation – type yes or y and press Enter.

Note: Instead of running each command separately, you can update Kali Linux with a single command: apt update > apt upgrade.

Step 4: Remove unwanted packages

Free up disk space by removing stale packages left behind after the upgrade by running the following command:

apt autoremove

Kali Linux Update Tutorial Summary

How do I update Kali Linux? If you’re running the default installation, it’s a good idea to check for new updates every two weeks. After reading this article, you should know how to update and upgrade your Kali Linux system using the commands listed above.