Added information on package management

Signed-off-by: Aiden Gerbrandt <aiden.gerbrandt@entropic.pro>
This commit is contained in:
2025-12-14 16:17:30 -06:00
parent eba0d35f98
commit 7a44089e18
3 changed files with 106 additions and 0 deletions

38
Arch.md
View File

@@ -5,3 +5,41 @@ tags:
- [Arch Setup](ArchSetup.md)
- [Local Host Names](LocalHostNames.md)
## Package Management
### pacman
- The package manager for Arch distributions
- Graphical Software Management tools are not compatible and the command line must be used
- Packages are installed with `pacman -S <package>`
- `pacman -Syu` will update all the software on your system
### pacnew
Sometimes while updating you system you may get a warning about a ".pacnew" file being created.
This is because when a package updates it's default configuration file but you have changed the current config file to something other than the default pacman cannot automatically replace it with the new one.
So will keep your current config as it is and create a `/path/to/config/file.pacnew` file wth the new config.
Since sometimes updates bring new features that need to be configured, you should address this right away:
1. Run `vimdiff /path/to/config/file /path/to/config/file.pacnew` To view the differances between the files
- This requires the `vim` package installed
2. Edit the current config as needed to add what is missing, either directly in vimdiff or with your text editor of choice.
3. Once you are happy you should delete the .pacnew file.
### yay
- yay is a wrapper for pacman and uses pacman for normal package management
- yay additionally will automate the proccess of installing and updating packages from the [AUR](https://wiki.archlinux.org/title/Aur)
- It functions the same but `yay` is a shortcut for `yay -Syu` (to update the system)
- Software from `aur` should not automatically be trusted (see below)
- yay will ask if you want to "view diffs" when installing or updating, this is a quick way to check the pkgbuild and the differences to the new pkgbuild when updating
### Arch User Repository
The AUR is a collection of packages uploaded and maintained by the Arch community, and not the offical Arch maintainers.
It is a great resource as an easy way to install software not provided in the main Arch repos, but it is worth noting that anyone can upload anything, and there have been known cases of people uploading malware.
The nice thing is that the entire package format (known as the pkgbuild) is accessbale and human readable.
This does mean that any issues are eventually caught, but as with any case of downloading software off the internet, sticking to well known packages with lots of eyes on them is usually a good idea.
It is also a good idea to inspect the pkgbuild yourself, especially pay attention to the URLs within the file and ensure they are pointing to the correct place.
Packages in the AUR are not offically supported or considered by the Arch Maintainers when pushing updates, so if anything on your system will break from an update, it's more likely to be an AUR package.

12
Debian.md Normal file
View File

@@ -0,0 +1,12 @@
---
tags:
- Debian
---
## Package Management
### apt
- The package manager for Debian-based distros such as Ubuntu and Mint
- Graphical Software Management tools such as KDE Discover and GNOME Software are compatible
- Packages are installed with `apt install <package>` and uninstalled with `apt remove <package>`
- `apt update` will pull the latest information to know what packages have new versions
- `apt upgrade` will then update your system and installed programs

56
PackageManagement.md Normal file
View File

@@ -0,0 +1,56 @@
---
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 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](#flatpak) (Graphical programs) and Brew (Command-line programs) will install programs locally.