Files
Linux-Docs/PackageManagement.md
2025-12-14 20:53:23 -06:00

3.9 KiB

tags
tags
Arch
Debian
Bazzite

Installing Software on Linux

Package Management

Windows

In windows usually software is installed by going to that software's website, downloading and running the installer, and programs are responsible for keeping themselves up to date.

Linux

In Linux you should almost always install software through an official repository. Usually the maintainers of a linux distribution will maintain an official repository of software (including everything from system libraries and utilities to graphical applications), that can be downloaded and installed.

Package Manager

Instead of manually downloading, installing updating individual software packages, your system will have a Package Manager, which does exactly that.

You tell it what software you want, it'll download it and all its dependencies and install them. That also means you can tell your package manager to update and it'll manage making sure all your software is up to date, without programs have to individually manage it themselves. Traditionally you interacted with these package managers through the command line, but people have made graphical front ends for some of them, which allow you to browse and install software, and update your system through them.

Examples

  • apt
  • pacman
  • flatpak
    • Unlike other package managers, flatpak is built to work on any linux distribution and installs software entirely seperate from your system
    • Graphical Software Management tools such as KDE Discover, GNOME and Bazaar Software are compatible.
    • Flatpak programs can be installed system-wide or just for a single user.
    • There have been no known cases of malware from flathub, but the usual disclaimers of downloading programs applies.
      • Flatpak packages are often maintained by community members.
      • "Verified" only means that the devlopers of that software are the ones maintaining that package.

Immutable OS

There are now some Linux Distrobutions which are refered to as "Immutable"

What this means is that base system is a fixed, unchangeable thing. Which means you can't install software in the same way.

You can picture you system exisiting as 3 layers:

1. System Layer

The system is the base layer which includes all the software that runs your Operating Systems. In immutable systems, this layer is a fixed unchangeable thing. This means when you have a system update, the entire new system layer is downloaded and swapped in to replace your current one on the next reboot.

  • This ensures system updates are very clean, and it means the old system layer can be kept around, and used if there is something wrong with the new version.

Normally new software is installed directly to the system, but that is not possible in this case, since the System Layer cannot be edited. This is where the next two layers come from.

2. Package Layer

Usually software can be installed in the User Layer (see below), but sometimes software needs to be install onto the system itself, such as programs the interact directly with hardware.

In this case packages can be installed on top of the Base System in this layer. Packages installed here integrated tightly with the system and do add complexity, so if a program will work fine installed with other local options, then that should be chosen. But there are cases where this is the correct and best option.

On Bazzite programs are installed this way with rpm-ostree install <package> And it will install Fedora packages.

3. User Layer

The User "layer" is everything that is installed and changed by each individual user and will all be contained to within their /home/<username> directory. For the most part in immutable systems, additional software will be installed here. Package managers such as flatpak (Graphical programs) and Brew (Command-line programs) will install programs locally.