Installing the software you need is one of the first things to do in a fresh install of any OS, and GNU+Linux distros are no exception to this rule. However, installing applications in a Linux system may seem tricky to newcomers, used to the installation processes of Windows and Mac OS. In this post, I will explain how software installation works on most linux systems, focusing on the quintessential package managers.

Packages and dependencies

In Linux, most software installation is done through packages. Packages, as their name may suggest, are files which contain a software component, as well as other files it needs and information on how these should be installed in a system. Note that these software components aren’t necessarily programs on their own, often they are libraries, intended for other programs to use them. Commonly, a program requires other software components (as libraries) to be installed in order to work. This relationship is called dependency, as in this package depends on these other packages.

On a modern system, dependency relationships can be quite complex, since a single package can have multiple dependencies, which themselves have multiple dependencies, and so on. This approach (the use of small packages with small software components) can be quite messy. However, has the advantage of avoiding duplicates, since several programs can use the same library that came as another package, instead of bundling each their copy of it.

Note that packages aren’t restricted to user installed software. System software and files also come in the form of pre-installed packages.

There isn’t, however, a single package format. There are different formats for software packages, developed by a certain distribution, which require their corresponding package managers to be installed and managed. The main package formats are

  • DEB: used by debian and its derivatives. Use the .deb file extension
  • RPM: used by Red Hat and its derivatives. Use the .rpm file extension
  • Arch Linux Packages: used by Arch and its derivatives, doesn’t have a name as such, but rather use the .tar.xz extension.
  • Flatpak: this is a special type of package, meant to be distribution independent (more details on that later)

You’ve certainly heard of distros being “based” on other distros. What that means, is that said distro has adopted other distro’s package system. Ubuntu is based on Debian (and uses DEB packages), Mint on Ubuntu, etc. Most Linux distros nowadays enter into three main categories, according to which packaging system they use by default.

This tree shows the most important distros, and how they’re based on other ones. A more complete tree can be found at https://commons.wikimedia.org/wiki/File:Linux_Distribution_Timeline_21_10_2021.svg. Source: wikimedia commons

Repositories and Package Managers

So packages are units of software, meant to be installed on a system. They, however, do not install themselves. That the work of a Package Manager, which searches, obtains, installs, updates and removes packages. There are distinct package managers, meant to be used with specific package formats. DEB based systems ship with APT (Advanced Packaging Tool), while rpm based systems may use YUM, DNF or ZYPPER. These, however, are high level tools, which depend on dpkg and rpm, respectively, for installing individual packages.

Note that these are all terminal-based tools. Most distros come with graphical managers, which ease the installation of software for beginners. It is worth noting that these are only graphical interfaces built on top of the afore mentioned package managers, and that, under the hood, they’re using them.

GNOME Software. A graphical tool meant to ease the installation of software via package managers

To install a package, we can search for it online, download it and install manually with a low level tool. However, we would also have to install its dependencies, and repeat the process if we wanted to update it. This method is therefore, not recommended. A better approach would be to use high level tools (such as APT or DNF) to install packages. These tools are able to search for our package, manage its dependencies, install them, install our program and keep it updated. Think of them as the App Store or the Play Store, which perform similar tasks (even though Linux package managers are actually older than both!).

Of course, a package manager can only install packages that it knows of; that’s where repositories (or repos, for short) come into play. A repo is a collection of packages available on the internet, meant for package managers to use it. Distros include some default repos on their own, with a rather extensive catalogue of software. However, there may be software that isn’t listed on them, if that’s the case, installing it may require the use of additional repos, or other installation methods altogether (such as Flatpak, or some of the methods required below).

Non-package based installation methods

It is worth mentioning AppImage, the non-package based way of installing software in Linux. An AppImage is a file which contains the entirety of an app, no dependencies involved. It is the equivalent of a Windows executable (or .exe file). These files are rather heavy, and require manual updates, therefore, their use is only recommended if there are no other options available.

Another non-package based installation method is source code. Sometimes, a program’s developers will upload their program as source code, meant to be downloaded and compiled by the user, usually with automated scripts. These are also recommended if no other choice is available.


So this is a bit of the theory behind Linux software installation. It may seem complicated and counter-intuitive (and it is, to a certain point), but it offers great advantages compared to other installation ecosystems (specially the Windows one). With time, you can easily get used to it and get rather proficient at it too. On my next post, I will enter the practical details of installing software. See you then!

Featured photo by Kadarius Seegars on Unsplash