How to Update Kali Linux
In this tutorial, we will discuss about how to update the Kali Linux system. Kali Linux is a Debian-based Linux distribution that includes various unique and streamlined utilities to improve the accuracy, speed, and ease of pen-testing. On the surface, Kali appears to be exactly like any other operating system: it plays audio and text files, runs all the apps that Windows and macOS do, and we can even install it. It allows us to access the internet. Unlike other operating systems, Kali comes with a significant number of tried and tested pre-installed applications, making it more than a simple operating system.
Kali was first published in 2013 as a rebranded version of BackTrack Linux with a GNOME interface. The developers trimmed all the fat by removing BackTrack's subpar utilities and updating the ones admired in the WhiteHat community.
The Kali OS comes with approximately 600 tools, is fully free, and has a publicly accessible open-source Git tree. Kali Linux has become so well-known among cybersecurity specialists that the term "pen-testing" has become synonymous with it.
How to Update Kali Linux?
Kali uses the Debian Package management system, which permits us to update and upgrade our system with the apt or apt-get command. In order to update and upgrade Kali, we have to use the following steps:
Step 1: Check the Source List Files
When using the APT package manager to download updates, ensure the system is connected to the accurate remote repository. Configuration files /etc/apt/sources.list and /etc/apt/sources.list.d/ comprise URLs from which Kali installs packages and applications. We have to open the configuration files in order to check the source:
As shown in the image below, the output shows the URL deb http://http.kali.org/kali kali-rolling main contrib non-free.
The same is used for files inside /etc/apt/sources.list.d/.
Step 2: Update Package Manager
We have to update the package repository before installing the latest software to verify that we are downloading the most recent versions. To get the most recent package lists, we need to run the following command:
Step 3: Upgrade the System
Now, we can start the upgrade, which will install Kali Linux's most recent packages and updates. In order to upgrade Kali, we can use one of three commands:
There are slight differences between them:
Note: We can update kali Linux with one command instead of performing each command separately: apt update && apt upgrade.
Step 4: Remove Unnecessary Packages
Remove obsolete packages left after the upgrade to free up disk space by running the following command: