# Arch Config Use for `/etc`, pacman config, repos, mirrors, hooks, service/package config. ## Before Changing Classify: - file path - owning package - live reload/restart needed? - backup/rollback path - root required? Read-only probes: ```sh pacman -Qo /path/to/file pacman -Qii package systemctl cat unit.service systemctl status unit.service --no-pager ``` If root edit needed, delegate via user's shell. Prefer editor-safe command, e.g. `sudoedit /etc/file` when appropriate. ## Pacman Config Current truth: `man pacman.conf`, wiki `Pacman`. Stable rules: - Main config: `/etc/pacman.conf`. - Mirror list commonly included from `/etc/pacman.d/mirrorlist`. - Repository order matters when packages share names. - Directives are case-sensitive/CamelCase. - `NoUpgrade`/`NoExtract` paths are archive paths: no leading `/`. - Hooks are non-interactive; system hooks live under `/usr/share/libalpm/hooks/`, admin hooks commonly under `/etc/pacman.d/hooks/`. - Signature policy/current defaults: verify with `man pacman.conf`, do not weaken casually. ## Mirrors/Repos For stale/404/target-not-found problems, inspect: ```sh grep -v '^#' /etc/pacman.conf grep -v '^#' /etc/pacman.d/mirrorlist | head ``` Use current wiki `Mirrors`/`Reflector` before recommending tooling. After repo config changes, full upgrade before installing new packages. ## Service/Software Config - Check package docs + Arch Wiki page for that software. - Check ownership before editing generated/package-owned files. - Prefer drop-ins over modifying unit files directly. - State reload command separately: e.g. daemon reload, service restart, app reload. ## Current Sources - Man: `pacman.conf(5)`, `alpm-hooks(5)`, `pacman(8)` - Wiki: `Pacman`, `Mirrors`, target software page