Linux Admin Land

Group Management

Create Group

groupadd $group_name

User Management

Create User

useradd $user_name -d /home/$user_name -m -N -g $primary_group_name

Fix Installer Invalid or Corrupted Package:

sudo find /var/cache/pacman/pkg/ -iname "*.part" -exec rm {} ;
sudo pacman -Syyu

source

Create User with UID

useradd -u $user_id -g $group_id -M -s /usr/bin/nologin $user_name 

Change User Schell

chsh $user_name
< /bin/bash

Add Existing User to Existing Group

usermod -a -G $group_name $user_name

systemd

List all service files

systemctl list-unit-files
systemctl list-unit-files | grep name

Reload

Every time .service, .path systemd unit file changes systemctl needs to reload with:

systemctl daemon-reload

To Start on Boot

systemctl enable $name.service

Tail service logs

journalctl -u $unit_name

where $unit_name can be a short name like sshd instead of sshd.service.

Grub

Reinstall

Update grub.cfg after making any changes to /etc/default/grub or any file in /etc/grub.d/:

grub-mkconfig -o /boot/grub/grub.cfg

Install boot loader:

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB

GRUB on Arch Wiki