administering-linux · diff
git:20260919.c5defa2 to git:20261013.df0a08f
27 added, 25 removed. Audit A to A.
---
name: administering-linux
- description: "Практическая Linux-админка systemd-хоста: journalctl, systemctl, unit, drop-in, failed-service after reboot, OOM, df, ssh, Ubuntu Debian. Не Docker и не Ansible. Триггеры: journalctl, unit file, drop-in, oom killer, disk full, sshd, ubuntu server, failed unit, vendor unit, host troubleshooting."
+ description: "Hands-on Linux administration of a systemd host: journalctl, systemctl, unit, drop-in, failed-service after reboot, OOM, df, ssh, Ubuntu Debian. Not Docker and not Ansible. Triggers: journalctl, unit file, drop-in, oom killer, disk full, sshd, ubuntu server, failed unit, vendor unit, host troubleshooting, сервер, диск заполнен, служба не стартует, логи, линукс."
---
# Administering Linux
- Рабочий skill для эксплуатации Linux-сервера. Цель — починить хост командами,
- которые можно копировать, а не пересказывать man pages.
+ Working skill for operating a Linux server. The goal is to fix the host with commands
+ that can be copied, not to retell man pages.
- Не используй этот skill как основной для Docker, GitLab CI, Ansible, Amnezia
- или policy routing: там свои skills (`docker-ops`, `gitlab-ci`,
+ Do not use this skill as the primary one for Docker, GitLab CI, Ansible, Amnezia
+ or policy routing: they have their own skills (`docker-ops`, `gitlab-ci`,
`ansible-playbook`, `amnezia-vpn`, `linux-routing`).
- ## Когда использовать
+ ## When to use
- - Сервис не стартует, падает, не слушает порт, не поднимается после reboot.
- - Нужен unit file, timer, drop-in override, logrotate.
- - Разбор CPU/RAM/IO/disk full/OOM/load.
- - Пользователи, sudo, SSH, пакеты, базовый firewall.
- - «Почему хост тормозит / не пускает / не резолвит DNS».
+ - A service does not start, crashes, does not listen on its port, does not come up after reboot.
+ - You need a unit file, timer, drop-in override, logrotate.
+ - CPU/RAM/IO/disk full/OOM/load analysis.
+ - Users, sudo, SSH, packages, basic firewall.
+ - "Why is the host slow / refusing logins / not resolving DNS".
## Workflow
- 1. Зафиксируй distro и роль хоста: `source /etc/os-release; hostnamectl; uptime`.
- 2. Отдели симптом: сервис, диск, память, сеть, auth.
- 3. Смотри факты, не гипотезы: `systemctl --failed`, `journalctl -xe`, `df -h`,
+ 1. Pin down the distro and the host's role: `source /etc/os-release; hostnamectl; uptime`.
+ 2. Isolate the symptom: service, disk, memory, network, auth.
+ 3. Look at facts, not hypotheses: `systemctl --failed`, `journalctl -xe`, `df -h`,
`free -h`, `ss -lntup`.
- 4. Меняй один слой за раз. Для unit-файлов — drop-in, не правь vendor unit.
- 5. После фикса проверь: статус сервиса, порт, лог, reboot-persistence (`enable`).
+ 4. Change one layer at a time. For unit files use a drop-in; do not edit the vendor unit.
+ 5. After the fix verify: service status, port, log, reboot persistence (`enable`).
- ## Быстрые факты
+ ## Quick facts
```bash
source /etc/os-release
systemctl --failed
journalctl -p err -b --no-pager | tail -n 80
df -hT
free -h
ss -lntup
```
- - Ubuntu/Debian: `apt`, netplan, часто `ufw`.
- - RHEL/Rocky/Alma: `dnf`, NetworkManager, часто `firewalld` + SELinux.
- - Не убивай процесс через `kill -9`, пока не исчерпан `systemctl stop` / SIGTERM.
- - Не рестартуй `sshd` в единственной сессии без проверенного `sshd -t` и
- запасного канала.
+ - Ubuntu/Debian: `apt`, netplan, often `ufw`.
+ - RHEL/Rocky/Alma: `dnf`, NetworkManager, often `firewalld` + SELinux.
+ - Do not `kill -9` a process until `systemctl stop` / SIGTERM is exhausted.
+ - Do not restart `sshd` in your only session without a passing `sshd -t` and
+ a fallback channel.
## Companion skills
- - Docker-демон, compose, контейнер не стартует → `docker-ops`.
- - Плейбуки и идемпотентность → `ansible-playbook`.
+ - Docker daemon, compose, container will not start → `docker-ops`.
+ - Playbooks and idempotency → `ansible-playbook`.
- `ip rule`, fwmark, nft NAT, policy routing → `linux-routing`.
- Pipeline/runner → `gitlab-ci`.
## References
- `references/systemd-journal.md` — unit files, drop-in, timers, journalctl.
- - `references/diagnosis.md` — CPU/RAM/IO/disk/OOM/сеть/SSH, готовые команды.
+ - `references/diagnosis.md` — CPU/RAM/IO/disk/OOM/network/SSH, ready-made commands.
<!-- A-EVOLVE-ROUTING-SIGNALS:START -->
## Routing signals: linux systemd journalctl systemctl sshd unit file disk full oom load average apt dnf ubuntu debian rhel rocky host troubleshooting
<!-- A-EVOLVE-ROUTING-SIGNALS:END -->
+
+ Russian version: [`references/README.ru.md`](references/README.ru.md).