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 2023.x So let’s get started;
$ cat /etc/os-release
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2023.1"
VERSION_ID="2023.1"
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 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.
Related article:
- Add Debian 10 Buster Official repositories to sources.list
- Install add-apt-repository on Debian & / Ubuntu Linux
Top Cyber Security Learning Books:
- Recommended Security Books to read:
- Best Penetration Testing Books
- Best Cybersecurity Books To Read
- Best CompTIA Security+ (SY0-601) Certification Books
- Best Books To Learn Data Security & Encryption
- Top Certified Information Security Manager (CISM) study books