Pacman is the wonderful package manager that comes with Arch. One of the reasons I was drawned to Arch is the name of his package manager. Another major reason was, of course, its rolling release nature.
Installing a package is done via the command:
pacman -S <package_name>
The command to get up-to-date repos is:
pacman -Sy
The command to get all software up-to-date on your laptop at once is:
pacman -Syu
Searching for packages to install is done via:
pacman -Ss <keyword>
Listing installed packages:
pacman -Q
Getting info, including dependencies and reverse dependencies, about an installed package:
pacman -Qi <package>
Remove an installed package, leaving all its dependencies untouched:
pacman -R <package>
Remove an installed package and its dependencies which are not required by any other installed package:
pacman -Rns <package>
Installing a package from the AUR
The previous explanations hold for getting software from the 2 official software repositories managed by Arch, named core and extra.
A third one exists, named the AUR (Arch User Repository) that contain extra packages proposed by other people.
Initially, my wish was to limit myself to the core and extra repos, but because, for some reason, companies around the world are allergic to the use of standard, libre VPN solutions, it is impossible to live without installing a bunch of goddamned proprietary VPN solutions, that, fortunately, may be found in the AUR.
Installing a package from the AUR requires the development tools to be installed on your machine:
pacman -S base-devel
Then, find, on https://aur.archlinux.org, the package you want to install.
On the page describing the desired package, you will fin the URL of the git repository from wich files allowing to build the package may be found. Clone the repo on a local folder. Personally, I use ~/sofware, so:
git clone <package_git_repo_url> ~/software
In the sub-folder S created within ~/software, you must normally have a PKGBUILD sub-folder. Type the following commands to build the package.
cd ~/software/<package_name>
makepkg
While executing makepkg, ensure you are not root: this operation cannot be performed as root.
You may encounter errors if dependencies are not found on your machine. On the package page on https://aur.archlinux.org, consult the list of dependencies and ensure all dependencies are installed.
If the operation succeeds, you will get one or more .zst files, which are pacman packages.
Install each of these local packages by typing:
pacman -U <file>.zst