Skip to content

Archy stuff

NikWillOrStuff edited this page Aug 7, 2020 · 13 revisions

TODO: add links to all referenced packages
TODO: https://wiki.archlinux.org/index.php/Sudo#Disable_root_login
TODO: https://wiki.archlinux.org/index.php/Sudo#Editing_files and https://wiki.archlinux.org/index.php/Sudo#Using_visudo
TODO: https://wiki.archlinux.org/index.php/Firefox#KDE/GNOME_integration
TODO: add automatic pacman mirror updating script of some kind

Properly setting up your package management

Quick intro to pacman

When I say pacman, I'm not talking about the arcade game. It is the command-line utility for downloading, installing, updating, searching for, and removing packages on Arch Linux. It is the primary and expected method to obtain new software. Hopefully you already knew all that, but if you need more info please refer to the official wiki article.

Usually pacman will be installing from the official Arch Linux online software repositories ("repo" is a common short name), but there are occasionally packages/applications that are not available there, and those must be installed with extra steps. This increases the system's complexity and the risk of infecting the system with malware, so it should be avoided when possible.

Enabling the multilib repository, and quirks with steam

Enabling the multilib repository is common for personal computers, especially if you intend to download and run games. For instance, the wiki page describing how to install steam on Arch notes it is a required step. This is because many games rely on 32-bit software to be installed, but Arch doesn't enable this repository of 32-bit software by default.

Do note that Arch Linux is not a platform that Steam is officially supported on. So it may stop working on Arch, and Steam Support won't help. But the Arch team officially supports this method of installing steam, and it seems pretty reliable ¯\_(ツ)_/¯

Also note that the steam package only installs the Steam Updater. Then the Steam Updater will continue to install and update your installation of Steam. So your Steam installation will update whenever it wants, you have to use steam configurations to control it. This is a nice way to automatically obtain the official Steam updates without waiting on the Arch community to convert each version of steam to Arch Linux.

Automatic package cache clearing

pacman keeps a cache of everything you install. This is a safe option but can fill your computer storage over time. You can use paccache to clear your cache as described in the official wiki

You can have also pacman automatically do these by using hooks. These are just small scripts in a specific folder that Pacman will run when doing certain operations.

Here are my hooks:

/etc/pacman.d/hooks/clean_package_cache.hook:

[Trigger]
Operation = Upgrade
Operation = Install
Operation = Remove
Type = Package
Target = *
[Action]
Description = Cleaning pacman cache...
When = PostTransaction
Exec = /usr/bin/paccache -r

/etc/pacman.d/hooks/empty_uninstalled_packages.hook:

[Trigger]
Operation = Upgrade
Operation = Install
Operation = Remove
Type = Package
Target = *
[Action]
Description = Purging pacman cache of uninstalled packages...
When = PostTransaction
Exec = /usr/bin/paccache -ruk0

Install an AUR Helper

Please note that AUR Helpers are not officially supported by the Arch Linux project. There is an official and proper way to install packages from the Arch User Repository. However for most packages in most situations, an AUR helper does the job properly, and more automatically than the official method. This is especially useful when updating all the packages on your system, since some AUR helpers can automatically update all your packages from the AUR, too.

yay (AUR package and official page) is by far the most recommended and most used AUR helper of the main options. It's a simple terminal command and supports all the same arguments as pacman (I think...). It is also the single most popular package on the AUR too (currently June 2020 as of writing).

yay is also a "pacman wrapper", meaning you can use yay for installing regular packages from the Arch linux repositories, too. It uses pacman in the backend to install those. This means by updating your system with yay, it will update all the packages from the Arch repositories and from the AUR with 1 command.

Only installing all your packages through pacman repositories (the official ones, when possible) and from the AUR means that you can update your entire system by running this terminal command, then answering the interactive questions:

yay -Syu

Installing it the first time should be done with the proper AUR installation method. An example of this method written specifically for installing yay is available on the official yay readme on github. After yay is functional, it can keep itself up-to-date when updating your system with yay

SSD TRIM

TODO: explain more info about this command:

sudo systemctl enable --now fstrim.timer

https://wiki.archlinux.org/index.php/Solid_state_drive#TRIM

CPU power efficiency

[cpupower] allows you to easily modify your system CPU frequency and governor. According to info from https://wiki.archlinux.org/index.php/CPU_frequency_scaling and http://www.phoronix.com/scan.php?page=news_item&px=MTM3NDQ apparently modern intel processors (sandy bridge and higher) can only use the "performance" and "powersave" govorners, but they both provide dynamic scaling. Even the performance governor should give better power saving functionality than the old ondemand governor (i.e. old intel or all(?) AMD processors)

The configuration file for cpupower is located in /etc/default/cpupower. This configuration file is read by a bash script in /usr/lib/systemd/scripts/cpupower which is activated by systemd with cpupower.service. You may want to enable cpupower.service to start at boot.

[tlp](https://www.archlinux.org/packages/community/any/tlp/) can be used for dynamic cpu performance adjustments, especially for laptops that go on and off of battery power. https://wiki.archlinux.org/index.php/TLP

good packages

Here's a growing list of good general-purpose utilities to install last, if it isn't already installed yet:

neofetch (shows system stats and specs)
dosfstools and ntfs-3g for file system support