Skilllibrary linux-ubuntu-ops
install
source · Clone the upstream repo
git clone https://github.com/merceralex397-collab/skilllibrary
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/merceralex397-collab/skilllibrary "$T" && mkdir -p ~/.claude/skills && cp -r "$T/10-cli-systems-and-ops/linux-ubuntu-ops" ~/.claude/skills/merceralex397-collab-skilllibrary-linux-ubuntu-ops && rm -rf "$T"
manifest:
10-cli-systems-and-ops/linux-ubuntu-ops/SKILL.mdsource content
Purpose
Administer Ubuntu/Debian systems: package management, service control, log analysis, user management, and firewall configuration.
When to use this skill
- installing, updating, or removing packages with
apt - diagnosing service failures with
andjournalctlsystemctl - configuring firewall rules with
orufwiptables - managing users, groups, and file permissions
Do not use this skill when
- writing systemd unit files from scratch — prefer
systemd-services - packaging software for distribution — prefer
packaging-installers - the task is shell scripting — prefer
bash
Procedure
- Update package index —
before installing. Usesudo apt update
to review.apt list --upgradable - Install packages —
. Pin versions for servers:sudo apt install -y pkg1 pkg2
.sudo apt install nginx=1.24.0-1 - Diagnose service —
, thensystemctl status svc
.journalctl -u svc --since "10 min ago" --no-pager -n 50 - Check resources —
(disk),df -h
(memory),free -h
(listening ports),ss -tlnp
.top -bn1 | head -20 - Manage users —
,sudo adduser --disabled-password deploy
.sudo usermod -aG sudo deploy - Configure firewall —
,sudo ufw allow 22/tcp
,sudo ufw allow 443/tcp
,sudo ufw enable
.sudo ufw status verbose - Set up unattended upgrades —
,sudo apt install unattended-upgrades
.sudo dpkg-reconfigure -plow unattended-upgrades - Clean up —
.sudo apt autoremove -y && sudo apt autoclean
Common diagnostics
# Why did a service fail? journalctl -u myservice --since "1 hour ago" -p err --no-pager # What is using port 8080? ss -tlnp | grep 8080 # Disk usage by directory du -sh /var/log/* | sort -rh | head -10 # Failed login attempts journalctl _COMM=sshd --since today | grep "Failed" # Kernel messages dmesg --level=err,warn | tail -20
Decision rules
- Always run
beforeapt update
— stale indexes cause version mismatches.apt install - Use
not legacysystemctl
scripts./etc/init.d/ - Prefer
over rawufw
unless complex NAT rules are needed.iptables - Never run services as root — create a dedicated user or use
in systemd.DynamicUser=yes - Use
over manual log file tailing — it handles rotation and filtering.journalctl
References
Related skills
— writing unit filessystemd-services
— remote server managementssh-tmux-remote-workflow
— process-level debuggingterminal-debugging