Kali Linux Tutorial MK007  

All Repositories for Kali Linux ( APT, Sana and Network Mirrors)

How to Add Repositories to Kali Linux

Hi Geeks,

In this post am going to guide you how to add Repositories to Kali Linux. The repositories suggested in this post are copied from there Official Site.

Content:

  • What is Repository?
  • How to add Repositories to source list
  • APT Repositories
  • Update your System.
  • Old Sana Repositories
  • Network Mirrors

What is Repositories ?

    Repository –  “A place where things or packages are stored”.

APT Repositories:

If no APT repositories are present, If you run any APT commands, then you was encountered by the following error.

mk007@Linuxlia:~# sudo apt-get install package_name 
Reading package lists... Done
Building dependency tree Reading state information... Done
E: Unable to locate package

Copy the below codes and paste them in 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

 

How to add repositories to Source list?

  • You want to add the repositories to the source list.
  • Open a terminal and type the following command.
mk007@linuxlia:~$ sudo nano /etc/apt/sources.list
  • Paste the copied repositories and save it.
  • Ctrl+O for saving. Ctrl+X for exit.

Update your system:

After adding repositories to the source list, update your system.

mk007@linuxlia:~$ sudo apt-get update
mk007@linuxlia:~$ sudo apt-get dist-upgrade

 

 

Old Sana Repositories:

If no Old or Sana repositories are present, then you was encountered by the following errors.

Was not possible to install The Packages Labeled (Not Ok) in this list above

mk007@Linuxlia:~# sudoapt-get install linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-4.9.0-3-amd64
E: Couldn't find any package by glob 'linux-headers-4.9.0-3-amd64'
E: Couldn't find any package by regex 'linux-headers-4.9.0-3-amd64'

If you need all the old and new packages of Kali Linux. Get all the packages of Kali Rolling from Kali SANA 2.0.

Copy the below codes and paste them in sources list and update the system.

deb http://old.kali.org/kali sana main non-free contrib 
# For source package access, uncomment the following line 
deb-src http://old.kali.org/kali sana main non-free contrib

 

Network Mirrors:

Network mirrors are help you to connect your network to LAN (Local Area Network). So using mirrors can increase your network or downloading speed.

But using network repositories are not safe one (or) suggested one. If you was a pentester, then definitely avoid this. Because it shares your location to the local network.

Copy the below codes and paste them in sources list and update the system.

deb https://mirrors.ocf.berkeley.edu/kali kali-rolling main non-free contrib
deb-src https://mirrors.ocf.berkeley.edu/kali kali-rolling main non-free contrib

Conclusion:

If you have any doubts about this post please leave a comment otherwise ping me in Instagram. Am ready to solve your doubts.

Leave A Comment