Now, if you’re like me (which is a good thing), you might have been avoiding this task for a while now because it sounds complicated and scary. Don’t Worry bro, I’m here to break it down in simple terms that even your grandma could understand!
First, let’s make sure we have all the necessary tools installed on our system. To do this, open up your terminal (or command prompt if you’re a Windows user) and type:
# This line uses the "sudo" command to run the following command as a superuser, allowing for system changes.
# The "apt-get" command is used to manage software packages on Debian-based systems.
# The "update" option updates the list of available packages and their versions.
# The "&&" operator allows for multiple commands to be executed in sequence.
# The "upgrade" option upgrades all currently installed packages to their latest versions.
# The "-y" option automatically answers "yes" to any prompts during the upgrade process.
sudo apt-get update && sudo apt-get upgrade -y
This will update your package list and then automatically install any available updates for your system. Pretty easy, right? Now let’s move on to the actual upgrading process!
To do this, we need to add a new repository to our sources list. This is where Kali Rolling gets its updates from. To add it, type:
#!/bin/bash
# This line adds a new repository to the sources list for Kali Rolling updates.
echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" | sudo tee -a /etc/apt/sources.list > /dev/null
# This line updates the package list for the system.
sudo apt update
# This line automatically installs any available updates for the system.
sudo apt upgrade -y
# This line removes any unnecessary packages that may have been installed during the update process.
sudo apt autoremove -y
# This line displays a message to indicate that the upgrade process is complete.
echo "Upgrade process complete!"
This will add the new repository to our sources list and then update it with any available updates for Kali Rolling. Next, we need to import the GPG key that is used to sign the packages in this repository. To do this, type:
# This line uses wget to download the archive key from the specified URL and saves it as a file named "archive-key.asc"
wget -qO archive-key.asc https://archive.kali.org/archive-key.asc
# This line uses sudo to run the apt-key command, which adds the downloaded key to the list of trusted keys for apt
sudo apt-key add archive-key.asc
This will download and install the GPG key for Kali Rolling. Now that we have added the new repository and imported the GPG key, let’s update our package list again:
# This line updates the package list and upgrades any outdated packages.
sudo apt-get update && sudo apt-get upgrade -y
This will download any available updates from both our current repositories (which should still be there) as well as the new Kali Rolling repository. Once this is done, we can proceed with upgrading to the latest version of Kali Rolling! To do this, type:
# This line uses the sudo command to run the following command as a superuser, allowing for system-wide changes.
sudo apt-get update
# This line updates the list of available packages and their versions from the repositories.
sudo apt-get upgrade -y
# This line upgrades all installed packages to their latest versions, with the -y flag automatically answering yes to any prompts.
sudo apt-get dist-upgrade -y
# This line upgrades the distribution by installing and removing packages as necessary, with the -y flag automatically answering yes to any prompts.
sudo apt-get install kali-linux-full -y
# This line installs the full version of Kali Linux, including all tools and packages.
sudo apt-get autoremove -y
# This line removes any unnecessary packages that were previously installed.
sudo apt-get clean
# This line removes any downloaded package files that are no longer needed.
sudo apt-get autoclean
# This line removes any old or unused package files.
sudo apt-get update
# This line updates the list of available packages and their versions from the repositories.
sudo apt-get dist-upgrade -y
# This line upgrades the distribution by installing and removing packages as necessary, with the -y flag automatically answering yes to any prompts.
This will upgrade our system to the latest version available in the new repository. And that’s it ! You should now have a shiny new upgraded Kali Rolling system with all the latest tools and features. Congratulations, you did it!