Skip to main content
Tips

How to Update Kali Linux With One Single Command

Learn to update a Kali Linux system in one single command. Yes, it's that easy and straight forward.

Abhishek Prakash

Warp Terminal

If you want to update Kali Linux system, all you need to do is to use the command below:

apt update && apt upgrade -y

It’s not a single command, to be honest. It’s a combination of two commands: apt update and apt upgrade.

Update Kali Linux

Don’t worry. I’ll explain the commands to you. This way you’ll have a better understanding of what you are doing.

Normally, you need to be sudo user to run these commands, but in Kali Linux, you are always root. In case you are wondering the default password is “toor”, for a fresh Kali install. We recommend changing this to something more secure later on.

Updating Kali Linux explained

Kali Linux is based on Debian, just like Ubuntu. So, Ubuntu and Kali Linux both use the Debian’s package management system apt. The procedure is the same as updating Debian.

The apt command is used to install/remove or update packages i.e. software on your system. That’s why it’s called a package manager.

Lets look at the two commands I have combined together with the “&&” option, “update” and “upgrade”. This has confused many as to why there is an “update” command, that is supposed to update the system, then we are also using the “upgrade” command after all is done. Why is “upgrade” command even used?

Let me explain that to you.

apt update

This command refreshes the list of repositories on your system. Basically, your system checks if there is a new packages available from the Kali Linux servers, or if there is a new version of a package available.

The “apt update” command doesn’t install the new packages or even update the existing packages. It just fetches the information about the packages.

apt upgrade

This is the command that actually updates your system. When you run the “apt update” command, your system knows which packages have an update available. When you run the “apt upgrade” command, your system will start downloading the updates on those packages. Once finished, it will upgrade them to their newer versions.

Now you know the differences between “apt update” and “apt upgrade” as single commands.

apt update && apt upgrade -y

With the “&&” option, I combined two commands into one. This way the second command “apt upgrade -y”, runs automatically after the first command finishes successfully.

Some may wonder, why did I use “-y” option in the “apt upgrade -y” command? It’s because I wanted to save some of your time.

You see, when you run the “apt upgrade” command, it will ask for your confirmation before installing any upgrades. It waits for your input. You’ll have to type “yes”, “y”, or simply press “enter” during these times

If you provide the “-y” option when you run the “apt upgrade” command, it automatically accepts the changes to be made when you are prompted. This way you don’t have to manually enter “y” or “yes” each time, and your system doesn’t take so long to complete the task at hand.

I hope this short tutorial helps both you and others, to better understand, the process to update Kali Linux OS.

Abhishek Prakash