After installation of Kali Linux from ISO file, you may need to manually update the APT sources.list file with the official list of repositories. This guide will show you how to add Kali Linux apt repositories to sources.list.
The software repositories are required by Apt for downloading packages and installing them onto your computer. I’m doing this on a Kali Linux rolling release 2021.x So let’s get started.
$ cat /etc/os-release PRETTY_NAME="Kali GNU/Linux Rolling" NAME="Kali GNU/Linux" ID=kali VERSION="2019.4" VERSION_ID="2019.4" VERSION_CODENAME="kali-rolling" ID_LIKE=debian ANSI_COLOR="1;31" HOME_URL="https://www.kali.org/" SUPPORT_URL="https://forums.kali.org/" BUG_REPORT_URL="https://bugs.kali.org/"
Login as root or user to your machine and launch a terminal.
In the terminal, check the current list of apt repositories present in the system.
$ cat /etc/apt/sources.list
If no APT repositories are present, paste the code below to add them.
sudo tee -a /etc/apt/sources.list<<EOF deb http://http.kali.org/kali kali-rolling main non-free contrib deb-src http://http.kali.org/kali kali-rolling main non-free contrib EOF
The command above will add standard and source repositories in /etc/apt/sources.list. Confirm they are added.
$ cat /etc/apt/sources.list # # deb cdrom:[Debian GNU/Linux 2019.4 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20191125-10:47]/ kali-last-snapshot contrib main non-free #deb cdrom:[Debian GNU/Linux 2019.4 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20191125-10:47]/ kali-last-snapshot contrib main non-free # This system was installed using small removable media # (e.g. netinst, live or single CD). The matching "deb cdrom" # entries were disabled at the end of the installation process. # For information about how to configure apt package sources, # see the sources.list(5) manual. deb http://http.kali.org/kali kali-rolling main non-free contrib deb-src http://http.kali.org/kali kali-rolling main non-free contrib
Update your packages list:
$ sudo apt update Get:1 http://kali.download/kali kali-rolling InRelease [30.5 kB] Get:2 http://kali.download/kali kali-rolling/main Sources [12.8 MB] Get:3 http://kali.download/kali kali-rolling/non-free Sources [130 kB] Get:4 http://kali.download/kali kali-rolling/contrib Sources [60.1 kB] Get:5 http://kali.download/kali kali-rolling/main amd64 Packages [16.4 MB] Get:6 http://kali.download/kali kali-rolling/non-free amd64 Packages [196 kB] Get:7 http://kali.download/kali kali-rolling/contrib amd64 Packages [96.6 kB] Fetched 29.7 MB in 24s (1,237 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done 597 packages can be upgraded. Run 'apt list --upgradable' to see them.
You can optionally do a system upgrade
sudo apt -y upgrade sudo systemctl reboot
We will be adding more articles on Kali Linux. So keep checking our site for new content.
Top Cyber Security Learning Video Courses:
- Kali Linux Tutorial For Beginners
- The Complete Ethical Hacking Course: Beginner to Advanced!
- The Complete Cyber Security Course : Hackers Exposed!
- The Complete Cyber Security Course : Network Security!
- The Complete Cyber Security Course : End Point Protection!
- Network Hacking Continued – Intermediate to Advanced