[Archlinux] pacman, yay, faillock

This commit is contained in:
2025-08-31 22:42:20 +02:00
parent 3dface826f
commit 0a41f6b65a
2 changed files with 61 additions and 10 deletions

View File

@@ -7,14 +7,13 @@ tags: [ "distros", "arch" ]
Edit `/etc/systemd/system/getty@tty1.service.d/override.conf` by typing:
```bash
```sh
sudo systemctl edit getty@tty1
```
The put in the following, changing `[ USER ]` to your username.
```
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin [ USER ] -s %I 115200,38400,9600 vt102
@@ -25,9 +24,22 @@ ExecStart=-/usr/bin/agetty --autologin [ USER ] -s %I 115200,38400,9600 vt102
In `.bashrc`.
```
```sh
if [ -z "$DISPLAY" ] && [ "$(fgconsole)" -eq 1 ]; then
exec startx
fi
```
# Faillock reset
After failing 3 times to enter the password, archlinux would ussualy lock entering the password for 10 minutes, not all apps and guis display this message, so sometimes it can be a bit confusing. To reset this lockdown, you can login as root and restart it manually with command
``` sh
failock --reset
```

View File

@@ -7,50 +7,56 @@ Packages are kept in /var/cache/pacman/pkg.
Delete unused old packages with:
```bash
```sh
sudo pacman -Sc
```
Signatures are handled by the pacman-key, initially set up with:
```bash
```sh
sudo pacman-key --populate archlinux
```
And refreshed with:
```sh
sudo pacman-key --refresh-keys
```
If you have usigned keys, you can refresh with:
```bash
```sh
sudo pacman -Sc
```
or
```bash
```sh
sudo pacman -Scc
```
Reset all keys with:
```bash
```sh
sudo rm -r /etc/pacmand.d/gnupg/ && sudo pacman-key --init
```
If you're constantly getting 'everything corrupted, nothing upgraded', try running:
```bash
```sh
sudo pacman -S archlinux-keyring
```
List all orphaned packages:
```bash
```sh
sudo pacman -Qtdq
```
```sh
sudo pacman -Rn <package_name> #removing the package
```
## Cleaning Config Files
Arch does not overwrite your changes to configuration files.
@@ -61,3 +67,36 @@ These changes must be merge manually.
Install the `pacdiff` tool to make this easier, from the `pacman-contrib` package, then simply run `sudo pacdiff` to sort through the various mergers.
# AUR helpers (yay, paru,..)
Installing helper can be done by cloning and building that package from AUR repository, to avoid doing that manually and to automate updating, we use helpers.
Building Yay:
```sh
sudo pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
```
Flags are mostly the same as in pacman
But running yay without flags will do the update like `yay -Syu` and with package name it will search packages in aur and pacman repos, and let you choose which to install
```sh
yay <search_term>
```
Building the package can usually take some time, and after the build it will ask for sudo password, if afk installation will fail, to avoid this you can use the flag `--sudoloop` and enter the sudo password initially and it will loop it untill finishing the installation, to avoid answering all of the installation question `--noconfirm` can be used
```sh
yay -S --noconfirm --sudoloop <package_name>
```
## Pacman and yay text coloring
Getting the colors is done by editing the `/etc/pacman.conf` and uncommenting the line `Color`
By adding the line `ILoveCandy` you will unlock soem terminal animations, like one pacman eating the dots while installing some package