Tuesday, October 8, 2024
Google search engine
HomeSecurity & TestingAdd Kali Linux official repositories to sources.list

Add Kali Linux official repositories to sources.list

.tdi_3.td-a-rec{text-align:center}.tdi_3 .td-element-style{z-index:-1}.tdi_3.td-a-rec-img{text-align:left}.tdi_3.td-a-rec-img img{margin:0 auto 0 0}@media(max-width:767px){.tdi_3.td-a-rec-img{text-align:center}}

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.

.tdi_2.td-a-rec{text-align:center}.tdi_2 .td-element-style{z-index:-1}.tdi_2.td-a-rec-img{text-align:left}.tdi_2.td-a-rec-img img{margin:0 auto 0 0}@media(max-width:767px){.tdi_2.td-a-rec-img{text-align:center}}

kali linux login

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:

Top Cyber Security Learning Books:

.tdi_4.td-a-rec{text-align:center}.tdi_4 .td-element-style{z-index:-1}.tdi_4.td-a-rec-img{text-align:left}.tdi_4.td-a-rec-img img{margin:0 auto 0 0}@media(max-width:767px){.tdi_4.td-a-rec-img{text-align:center}}

RELATED ARTICLES

Most Popular

Recent Comments