--- 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](Debian.md#apt) - ##### [pacman](Arch.md#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 developers of that software are the ones maintaining that package. ### Graphical Package Management There are a number of graphical programs that allow you to install, update and otherwise manage the software on your computer. They still use your package manager to preform actions under the hood, but they provide a nice graphical interface to do so. #### Discover Discover by KDE is the graphical software manager for KDE Plasma Desktop. Adding Flatpak support and the Flathub software repository may be desirable for desktop users, especially on a distribution like debian where all the software tends to stay on older versions for the sake of absolute stability. There is also a number of programs that may not be packaged by your linux distribution, and may only be available through flathub. You can add Flatpak support and the Flathub repository with the following steps (tested on debian 13): 1. Open Discover and select the Settings tab 2. At the bottom under "Missing Backends" click the install button next to the "Integrates Flatpak Applications into Discover" 3. Once the install is complete you can close and reopen Discover. 4. At the top of settings you should now see "Add Flathub" on the top-right, if not log out and back in. Click this button. 5. Log out and back in, or restart. You should now see flatpak apps, and have the option to install the flatpak version of exisiting apps. 6. If you wish, under settings you can select "Make Default" next to Flatpak, to always install from flatpak when available. Note: Flathub packages are not verified for usability or security by the debian maintainers. This is usually not any issue, but something to be aware of. See [above](#flatpak) for more info. ## 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 ` 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/` directory. For the most part in immutable systems, additional software will be installed here. Package managers such as [flatpak](#flatpak) (Graphical programs) and Brew (Command-line programs) will install programs locally.