Repositories in Linux  What are they? + How They Work ▷ 2021

For many users, especially the newer ones on the Linux topic, it is difficult to handle certain aspects of the operating system such as, for example, the installation of new software since in many cases they do not know where to look for it.

For this reason, all Linux distributions have online application deposits called repositories, which are packed with applications optimized for each distribution, and feature simple and secure download and installation methods.

In the next paragraphs We will teach you step by step how to access these repositories and navigate through them to obtain the necessary applications for the use you want to give your Linux terminal.

What are repositories and what are these servers for in Linux?

Add OwnCloud package repository

In its simplest concept, a repository is a system accessible through the internet that houses hundreds of software designed to work generally with all Linux distributions, or with a specific distribution. Each Linux distribution has its own group of repositories, in which we can find large amounts of programs that we can download and install on our computer.

In addition to the repositories of each distro, we also have the possibility to install and use third-party repositories with more updated versions of some software that we are using, or that has not been added in the repository of the distro. While these software repositories contain all the programs we might need, Linux requires the use of a package manager, which will allow us to install the downloaded applications.

How do repositories work and what are the main uses for them?

Install Docker repositories

What should be understood about repositories is that they not only contain the programs necessary for the operating system, but also they manage the additional information necessary for these to work. The main use of these files is to provide the user with access to the applications and programs necessary to function on their computer, through a secure channel with guaranteed compatibility and operation, in the case of the native repositories of each distribution.

These pre-installed repositories are managed by two large groups: the Free Software community and the creator and distribution manager staff, so that the packages that enter these repositories are tested and are completely safe and compatible. Even in the case of third-party repositories, all programs that are added to a repository go through a long and rigorous testing process before being approved, so a repository is a safe source from which to obtain a program.

In addition to that, they greatly facilitate the process of updating programs, since, in general, repositories notify when an installed program update is released, so we can easily acquire the new version through our package manager. Compared to other operating systems other than Linux, the repositories have a single disadvantage, and that is that in order to install a program or update the operating system, it is necessary to be connected to the internet.

This is so because, although many actions can be performed offline, to install a new program it is necessary to download all of its dependencies, and this can take a very long time. This could well be considered a minor inconvenience, since there are few places where there is no internet connection, but for some users this can still represent a problem, although it is one that would disappear completely if the use of repositories such as Snap or Flatpak.

We teach you how to add repositories in Linux Debian in an easy way like an expert

Debian is one of the oldest Linux distributions, and it still continues firmly as one of the best, since, in addition to being constantly updated, has served as the basis for many other distributions. All Debian-based distros, and Debian itself, manage installed programs via Advanced Package Tool (APT).

A package manager that reviews programs and their dependencies before installing. This distribution has several repositories, but there is always the possibility that the program we are looking for is not found in any of them.

For these cases, we will have to install our own repositories, and there are two methods to do it in Debian:

From the Shell

Shell environment interface on Debian Linux

To add repositories with this method, all you have to do is add the codes of the desired repositories to the list what will we see in the location /etc/apt/sources.list.

Where each element is made up of package type, web address, distribution and sections, organized as follows:

  • [code]Deb [servidor] [nombre del servidor] [sección del repositorio][/code].

With this in mind, here are the steps required to add repositories on Debian using Shell:

  • Enter the list of repositories located in /etc/apt/sources.list with a text editor. You can access it from the terminal using the Nano editor.
  • Write a new element in the list describing the repositories with the syntax we saw earlier. For instance deb http://deb.debian.org/debian stretch wine.
  • Guard the document and reboot the computer.

Once the computer starts up again, we will have the new repository ready to download and install the software we need. You can carry out this process several times to add new repositories.

From package manager

Package manager on Debian

This method it mixes a bit with the previous one, since you will need the repository format to be able to add it.

For this method, you will only need to enter the Linux settings and open the package manager, like this:

  • Search the app from the Debian search bar and open it.
  • Follow the route Ajustes > Repositorios.
  • In this section, Choose “Other software “, and press “Add” to add the new file
  • Enter the source of the repository following the format of the first method, and then press “Add source “

If everything was done correctly, the new repository will be installed and ready to use. You will be able to continue installing repositories and complementing with those of Debian to be able to access a great variety of packages.

If you have any questions, leave them in the comments, we will answer you as soon as possible, and it will surely be of great help to more members of the community. Thanks! 😉

Author: Mario José

Graduated in journalism, specialized in investigation, I look for the truth of all things. Now 100% focused on technology, computing and Internet issues.

You may be interested:

Rate this post

Leave a Comment