How to Update Kali Linux

Introduction

Kali Linux is known as one of the best operating systems for penetration testing. It is a Debian-derived Linux distribution with a large community of users.

The OS has a rolling release model with new releases coming out approximately four times a year. Make sure to check for updates and upgrades regularly. Doing so improves the overall security and speeds up system performance.

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

How to update Kali Linux.

Prerequisites

  • A system running Kali Linux (it is best to install Kali as a VM)
  • Access to a terminal window/command line (Ctrl+Alt+T)
  • A user account with sudo or root privileges

How to Update Kali Linux?

Kali uses the Debian Package management system, which allows you to update and upgrade using the apt or apt-get command. Follow the steps outlined below to update and upgrade Kali.

Step 1: Check the Source List Files

When downloading updates using the APT package manager, ensure the system is connecting to the correct remote repository. Configuration files /etc/apt/source.list and /etc/apt/source.list.d/ contain URLs from which Kali installs packages and applications.

Open the configuration files to check the source:

cat /etc/apt/source.list

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

Display the source list files for Kali Linux.

The same applies for files inside /etc/apt/source.list.d/.

Step 2: Update Package Manager

Before installing the latest software, you need to update the package repository to ensure you are downloading the newest versions. Run the following command to get the latest package lists:

apt update
Update Kali Linux package manager.

Note: Kali had a default root user on versions up to 2020.1. Since more and more users started running Kali as their day-to-day operating system, they decided to move to the traditional security model of having a non-root user. The default password for the root user is toor. If you are not logged in as the root, make sure to add the Linux sudo command prefix.

Step 3: Upgrade the System

Now you can run the upgrade, which installs 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 slight differences between them:

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

Once you decide how to upgrade, type in the command and press Enter. The system will ask you to confirm the installation - type yes or y and press Enter to do so.

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

Step 4: Remove Unnecessary Packages

Remove obsolete packages left after the upgrade to free up disk space by running the command:

apt autoremove

Conclusion

It is best to check for new updates every couple of weeks if running a default installation. After reading this article, you should know how to update and upgrade your Kali Linux system using the commands listed above.

Was this article helpful?
YesNo
Sofija Simic
Sofija Simic is an experienced Technical Writer. Alongside her educational background in teaching and writing, she has had a lifelong passion for information technology. She is committed to unscrambling confusing IT concepts and streamlining intricate software installations.
Next you should read
How to Install Kali Linux on VirtualBox
July 14, 2019

Kali Linux is a Debian-derived Linux distribution designed for penetration testing. With over 600 preinstalled...
Read more
Virtualbox vs VMware: Head-to-Head Comparison
February 9, 2021

VirtaulBox and VMware are two of the most popular virtualization platforms that allow you to run multiple virtual machines...
Read more
How To Install VirtualBox Extension Pack
January 20, 2021

This article gives a step-by-step guide on how to install the VirtualBox extension pack using a GUI or a CLI in Windows...
Read more
How to Install KVM on Ubuntu 20.04
December 3, 2020

KVM (short for Kernel-based Virtual Machine) is a Linux kernel module which enables creating and running virtual instances of other...
Read more