Kali Linux Repositories Explained [With Examples]

Written by - Deepak Prasad

In this article we will explore Kali Linux Repositories but before that let us understand about repositories in general and what do they mean.


What Are Linux Repositories?

If you have worked with any Linux distribution, you must have come across the word "repositories," especially when installing software or updating and upgrading your system. Repositories on Linux refer to a remote storage location where your system retrieves and installs software and packages. Therefore, when you execute a command like;

sudo apt update

you are simply pulling package information and package updates from the remote storage location. Most of these repositories are distribution-based.

Kali Linux repositories are different from those used by a distribution like BlackArch or Debian. Even though situations might force you to add a repository from another distribution to your system, it's not highly recommended even if they use the same package manager.


Default Kali Linux Repositories

Like any other Linux distribution, Kali Linux also comes with its own repositories from where you can install and update your system packages. These repositories are found in the sources.list file in the /etc/apt directory. When you install Kali Linux for the first time, you should see the following default repositories in the sources.list file. You can view the file by executing the command below:

grep -v '#' /etc/apt/sources.list | sort -u

Sample Output:

Kali Linux Repositories Explained [With Examples]

If you don't get a similar output, there are three most probable reasons as to why:

  • You have switched your Kali Linux branch : A branch is basically another version of Kali Linux with a few different features from the main branch. The main default branch of Kali Linux is kali-rolling.
  • You are using a custom image of Kali Linux: Kali Linux is free and open-source. Therefore, anybody can customize the existing and build their own different version of Kali Linux.
  • You are running an earlier version of Kali Linux (Kali Linux 2020.2 and earlier versions) installed without an internet connection.
Since Kali Linux 2020.3 release, the default network repositories are enabled even if the installation was done without an internet connection.


Switching Kali Linux Branches / Regular Repositories

Kali Linux supports several branches. In this post, we are going to look at the three main branches.

To switch to any of these branches, you will need to comment out the repository of your current branch in the sources.list file and add the repository for your desired branch.


Kali-rolling branch

This is the main branch enabled by default on your Kali Linux system. This branch is continuously updated and pulls most of the packages from the kali-dev branch.

deb http://http.kali.org/kali kali-rolling main non-free contrib


Kali-last snapshot branch

This branch is point-release which delivers much more stable software and software to users:

deb http://http.kali.org/kali kali-last-snapshot main non-free contrib


Kali-experimental branch

It contains packages that are still under testing from the kali-bleeding edge branch.

deb http://http.kali.org/kali kali-experimental main non-free contrib

From the image below, you can see the system is running on the kali-rolling branch.

Kali Linux Repositories Explained [With Examples]


Kali Linux Repository Format

As you will notice, the repository isn't just a link. It's divided into various sections:

deb             http://http.kali.org/kali       kali-rolling      main non-free contrib
(Archive)       (Mirror)                          (branch)             (Component)
  • Archive: This can either be deb or deb-src. Deb contains the pre-compiled binary packages we regularly use when installing software in most Debian-based distros. Deb-src indicates the program source.
  • Mirror: It should be set to HTTP:kali.org/kali.
  • Branch: This shows the current branch you are using.
  • Component: This refers to the package that you wish to use on your system. The three mainly used components in Kali Linux are main, non-free, and contrib.


Non-Kali Linux Repositories

If you want to install additional software, you might be required to add external repositories other than those meant for the Kali Linux system. These new repositories should NOT be added to the /etc/apt/sources.list file. Instead, they are stored in their own separate directory. The most common path for external repositories is the /etc/apt/sources.list.d directory. For example, to install Signal on Kali Linux, we would need to add the repository deb [arch=amd64] https://updates.signal.org/desktop/apt xenial main in your /sources.list.d directory.

Installing Kali Linux repositories on another distribution like Ubuntu or Debian might break the system. You might not see this immediately but as you continue adding more packages and updating the system, you increase the chances of your system not working. Similarly, adding another distribution's repositories to Kali Linux might break your Kali installation.



The topic "Linux repositories" can be quite challenging especially if you are just getting started with Linux systems. This post has given you a deeper understanding of repositories and how to switch between the different Kali Linux branches. Even though we mainly concentrated on the Kali-rolling branch, feel free to explore other Kali branches.


Deepak Prasad

He is the founder of GoLinuxCloud and brings over a decade of expertise in Linux, Python, Go, Laravel, DevOps, Kubernetes, Git, Shell scripting, OpenShift, AWS, Networking, and Security. With extensive experience, he excels in various domains, from development to DevOps, Networking, and Security, ensuring robust and efficient solutions for diverse projects. You can reach out to him on his LinkedIn profile or join on Facebook page.

Can't find what you're searching for? Let us assist you.

Enter your query below, and we'll provide instant results tailored to your needs.

If my articles on GoLinuxCloud has helped you, kindly consider buying me a coffee as a token of appreciation.

Buy GoLinuxCloud a Coffee

For any other feedbacks or questions you can send mail to admin@golinuxcloud.com

Thank You for your support!!

2 thoughts on “Kali Linux Repositories Explained [With Examples]”

Leave a Comment