In this blog post, I will discuss what a Software Repository, Package Manager and Source List is in Linux based operating system such as Kali Linux, Ubuntu, CentOS, Debian, Mac OS and many other flavors of Linux. These various flavors are otherwise called the Linux Distributions often abbreviated as Linux Distro.
Please note that this blog is a very brief discussion on Software Repository, Package Manager and Source List. Package management itself is a broad topic which every Linux user should learn.
Lets start the discussion with the concept of Software repository.
What is a Software Repository?
A software Repository is a place where software or data can be stored which can be accessed by users either for free or for a charge. The concept of software repository is more important in the case of open source world where the software source code is available for free to anyone who would like to study or modify them. The only restriction to using and editing open source code is that any modification to code should also be made available for free. That is, the source code which is based on any open source project must also be made available for free just as the original open source code.
The contribution of open source code in software development is immense. Open Source provided developers access to the source code which would other wise would not have been accessible. Suddenly developers had access to Operating systems, programming languages, various libraries, media players, GUI etc. These developers took the open source code and enhanced it, there by making it more and more efficient. Open Source is a community endeavor. You will be amazed at the discussions these community have. if you need any help it is freely available.
Growth of open source software also has a risk, which is the intent of the developer. Develops could create malicious software and they can published to the web disguised as a genuine application, there by compromising the security of the users.
Need for Software Repository
Below are the reasons why a Software Repository is required:
-
Provide genuine, trusted software
In the Open Source world, to protect the users from malicious software, there was a need to control how the software’s are distributed. The intent was to provide a one stop place to find genuine application which is guaranteed to be free from malware.
-
Solve all the package dependency issues
In the Linux world, the process of installation is not as simple as double clicking a Setup file in Windows. Things have improved now in Linux, but in earlier days, installing any package used to be a nightmare. The main problem was getting the dependencies right. Dependencies are those programs that are needed for the other programs to run successfully. Most of the time, these dependencies are not provided with the packages in Linux and needs to be installed separately. This created a lot of problems. This is where, software repositories shine. It provides all the related packages that are required to install and run any application.
-
One place where most of the applications are available
Problem with open source application is that they are available for free most of the time and are not marketed well. Most of the time people don’t know that such an application exists. Software repositories bring all such applications under one roof so that they can be found easily by the users.
-
Make Linux easy to use
10 years before, using Linux was a nightmare. Most of the time new users quit using Linux after fiddling with it for a few days. Linux was most widely used by seasoned professionals and on servers. Things have changed now. Software repositories now provide users ability to find Linux compatible software’s easily.
Installing a software in Linux
The way Windows installs applications or Software is very different from the way software’s are installed in a Linux machine. In Windows, there is a .exe or .msi file for installing any application. This setup file handles all the installation process.
But in Linux, normally we do not have a single setup executable file. Earlier, we had to download the source code and build it on the system talking into consideration all the dependencies. This used to be a complex process.
To simplify installing, removing, updating software, Linux distributions have package managers that automates the process of installing any application. In the background, it takes care of installing all the dependencies if required.
What is a Package Manager in Linux
To automate the process of installing, uninstalling, updating software’s in Linux, the Linux based operating systems provides Package Managers. Package Managers makes the process of installing software’s convenient. Various Package managers are:
- Synaptic package Manager- For Ubuntu
- DPKG – Debian Package Management System
- RPM (Red Hat Package Manager)
- Pacman Package Manager – Arch Linux
- Zypper Package Manager – openSUSE
- Portage Package Manager – Gentoo
What is a Linux Package
Package Managers work with packages that are archive files which consists compiled binaries and other resources making up the software, along with installation scripts. Packages also contain valuable metadata, including their dependencies, a list of other packages required to install and run them.
What is a Source List
Source List is what actually binds Package Managers and Software repositories together. Simply put, Source List is a file that contains the url to the server that hosts the software. Package managers download the application from the link provided by the source list and proceed with the installation process.
For example in Debian based system such as Ubuntu, Source list would look like:
deb http://deb.debian.org/debian jessie main
deb-src http://deb.debian.org/debian jessie main
deb http://deb.debian.org/debian jessie-updates main
deb-src http://deb.debian.org/debian jessie-updates main
deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main