Now that we have Kali Linux installed, we will want to keep it updated with the latest tools, patches, and improvements.
Keeping Kali updated
Getting ready
Prior to modifying the Kali Linux configuration, you will need to have installed the operating system on a virtual machine. If you haven't already done this, refer to the Installing Kali Linux recipe.
How to do it...
Kali Linux should be ready and configured after installation, but we should check anyway. Kali uses a package manager called apt-get.
- The first thing we want to do is check the sources apt-get will use to look for updates. Navigate to the /etc/apt/ directory; there you should see a file named sources.list. If the file doesn’t exist, it's okay; we will create it.
- Run the following command from the Terminal. If the file exists, it will open; if not, it will create it:
- Now, let's add the following sources to the file if they don’t already exist. Make sure that you do not add any additional sources as they may break your Kali installation:
deb http://http.kali.org/kali kali-rolling main non-free contrib
- Your file should look like the following:
- Once the file matches what we previously stated, save and close it. Now we will run a few commands. These commands should be run periodically to keep your system updated. The -y flag appended to apt-get upgrade and apt-get dist-upgrade tells the command to assume yes when prompted:
- It may take the commands a while to execute, so feel free to get your caffeine fix while you are waiting. Reboot Kali Linux, and the procedure is done. You will want to run the previous commands periodically to keep your system up to date.
How it works...
Using a Kali Linux rolling update provides you with the latest package versions of your applications and testing tools, rather than needing to wait for the next static version of the operating system to be rolled out. Kali Linux comes pre-bundled with apt-get, this is the same package manager used by Ubuntu, and is what Kali Linux uses to keeping your distribution up to date.