/linux:linux-server-provisioningfrom linux
Provisions fresh Debian/Ubuntu or RHEL-family servers interactively: admin users, updates, firewall, services, and verification steps.
Ships in linux. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Two-family skill. The provisioning sequence is the same; the tools at each step differ. Body uses Debian/Ubuntu; substitute per this matrix.
| Provisioning step | Debian/Ubuntu | RHEL family |
|---|---|---|
| Package manager | apt | dnf |
| Update + base packages | apt update && apt install … | dnf install … (ensure_epel for extras on RHEL/Rocky/Alma) |
| Admin user group | usermod -aG sudo <u> | usermod -aG wheel <u> |
| SSH service unit | ssh (sshd is an alias, verified on Debian 12) | sshd; ssh does not exist |
| Apache service unit | apache2 | httpd |
| Auto security updates | unattended-upgrades | dnf-automatic |
| Workstation AppImage support | fuse3 desktop-file-utils; add libfuse2/libfuse2t64 for legacy AppImages | fuse3 desktop-file-utils; add app-specific libs such as mpv-libs when needed |
| Mandatory access control | AppArmor (already on) | SELinux enforcing (already on) |
| Time sync | systemd-timesyncd | chronyd |
| Install automation | autoinstall (subiquity) | Kickstart (Anaconda) |
| Regenerate GRUB2 | update-grub → /boot/grub/grub.cfg | grub2-mkconfig -o /boot/grub2/grub.cfg (UEFI: /boot/efi/EFI/<distro>/) |
| Set/list default kernel | grub-set-default + update-grub | grubby --set-default / grub2-set-default; grubby --default-kernel |
| Edit kernel boot args | edit GRUB_CMDLINE_LINUX + regenerate | grubby --update-kernel ALL --args/--remove-args |
See ../../01-provisioning-and-bootstrap/linux-cloud-init/references/kickstart-reference.md
for automated installs and
../../07-security-and-hardening/linux-server-hardening/references/selinux-reference.md
for SELinux. Workstation-only AppImage package baselines are owned by
linux-package-management; add them
only when the target host is a desktop/workstation, not a headless production
server. In sk-* scripts use the common.sh primitives (pkg_install,
ensure_epel, firewall_allow, svc_name) instead of hardcoding. Plan:
docs/multi-distro/plan.md.
linux-cloud-init.| Artefact | Source | Required? | If absent |
|---|---|---|---|
| Host role, distribution/release, hostname, timezone, and network identity | Build request and host facts | required | Stop the build and return the missing decisions. |
| Admin access model and break-glass path | System owner | required | Do not alter SSH or disable root/password access. |
| Required services, exposure, update, backup, and monitoring policy | Service owner | required | Produce only a minimal OS baseline and flag unowned controls. |
| Artefact | Consumer | Acceptance condition |
|---|---|---|
| Provisioned host baseline | Deployment/operations team | Identity, admin access, updates, firewall, required services, time, and mandatory access control match the approved build. |
| Build decision record | System owner | Records distro-specific choices, exposed ports, installed roles, exceptions, and recovery access. |
| Post-install evidence | Handoff reviewer | Checklist passes after a reboot and includes real service/path checks. |
references/provisioning-steps.mdreferences/post-install-verification.mdreferences/grub2-and-kernel-rollback.md — GRUB2 config model per family, default-kernel and boot-parameter management, kernel lifecycle, and rolling back to a known-good kernel after a panic../../01-provisioning-and-bootstrap/linux-cloud-init/references/kickstart-reference.md — Kickstart automated install (RHEL family)../../07-security-and-hardening/linux-server-hardening/references/selinux-reference.md — SELinux on a fresh RHEL server../../09-troubleshooting-and-recovery/linux-disaster-recovery/SKILL.md — GRUB regeneration after corruption and initramfs/filesystem repair from a rescue environment (use when GRUB itself is broken, not just the kernel)| Artefact | Acceptance condition |
|---|---|
| Provisioning evidence | Includes host facts, package/update result, tested administrator login, firewall and MAC state, services/ports, post-reboot checks, and exceptions. |
Read and execute access to the new host is required. User, SSH, firewall, package, boot, and service changes require explicit build authority. Destructive disk actions, DNS changes, public exposure, or production cutover require separate confirmation.
If console or second-session access is unavailable, do not harden SSH or remove the current access path. If reboot or external reachability cannot be tested, hand off a qualified partial build with those gates marked not assessed.
| Choice | Action | Failure or risk avoided |
|---|---|---|
| Repeatable image first boot | Route to linux-cloud-init | Manual, non-repeatable image setup. |
| Interactive host baseline | Follow this ordered build | Skipped prerequisites and lockout. |
| Fleet-wide ongoing state | Hand off to linux-config-management | Configuration drift after provisioning. |
For a new Rocky Linux web host, create and test a wheel administrator from a second session, apply updates, retain SELinux enforcing, expose only SSH/HTTP/HTTPS through firewalld, install only the approved web role, reboot, and record live reachability plus service health before deployment.
This skill is self-contained. The 11-section manual procedure below uses
only standard tools — Debian/Ubuntu by default, with RHEL-family equivalents
per the Distro support matrix above. No sk-provision-fresh wrapper is
shipped in this checkout; use the manual procedure below.
Sets up a fresh server. Ask first:
Work through sections in order. Full commands: references/provisioning-steps.md
| # | Section | Est. time |
|---|---|---|
| 1 | System update + hostname + timezone | 5 min |
| 2 | Admin user + sudo | 2 min |
| 3 | SSH hardening | 5 min |
| 4 | UFW firewall | 2 min |
| 5 | Automatic security updates | 2 min |
| 6 | Web stack (Nginx, Apache, PHP-FPM) | 10 min |
| 7 | Databases (MySQL, PostgreSQL, Redis) | 10 min |
| 8 | Supporting tools (fail2ban, certbot, rclone, msmtp, Node.js) | 10 min |
| 9 | Nginx snippets + catch-all config | 10 min |
| 10 | Clone linux-skills + install sk-* scripts | 5 min |
| 11 | Post-install security check | 5 min |
# After SSH hardening — ALWAYS test in a second terminal before closing first:
ssh administrator@<server-ip>
# After Apache port change — verify it's on 8080 not 80:
ss -tlnp | grep apache
# After MySQL install — bind to localhost:
grep bind-address /etc/mysql/mysql.conf.d/mysqld.cnf
# Final check (install once with: sudo install-skills-bin linux-security-analysis):
sudo sk-audit
# Test Nginx config
sudo nginx -t && sudo systemctl reload nginx
# All services should be active after provisioning:
for s in nginx apache2 mysql postgresql php8.3-fpm redis fail2ban; do
printf "%-20s %s\n" $s "$(systemctl is-active $s)"
done
# Verify firewall
sudo ufw status verbose
Full step-by-step installation commands: references/provisioning-steps.md
Next step after provisioning: linux-server-hardening
Part of standing up a host is owning its boot path — GRUB2 config, which kernel
is the default, boot parameters, and (critically) being able to roll back to a
known-good kernel after a panic. This lives here because it is provisioning-time
ownership of the boot path; recovery of a broken/unbootable GRUB from rescue
media belongs to linux-disaster-recovery.
# List installed kernels; mark the running one and the GRUB default
sudo sk-kernel-rollback --list
# After booting a prior kernel from the GRUB menu post-panic, make it the default
sudo sk-kernel-rollback # interactive pick + confirm
sudo sk-kernel-rollback --to 5.15.0-91-generic
# Regenerate GRUB after editing /etc/default/grub
sudo update-grub # Debian/Ubuntu
sudo grub2-mkconfig -o /boot/grub2/grub.cfg # RHEL family
Full model, per-family commands, and the post-panic rollback workflow:
references/grub2-and-kernel-rollback.md
After the basic OS and linux-skills are in place, running
sudo install-skills-bin linux-server-provisioning installs:
| Task | Fast-path script |
|---|---|
| List kernels / roll back to a known-good kernel | sudo sk-kernel-rollback [--list | --to <version>] |
These are optional wrappers — every action is also a plain command documented in the sections and references above.
This skill installs the following scripts to /usr/local/bin/. To install:
sudo install-skills-bin linux-server-provisioning
| Script | Source | Core? | Purpose |
|---|---|---|---|
| sk-kernel-rollback | scripts/sk-kernel-rollback.sh | no | List installed kernels and set a chosen prior kernel as the GRUB2 default (grubby on RHEL, grub-set-default + update-grub on Debian). Read-only with --list; asks before changing the default; never removes a kernel. |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub peterbamuhigire/linux-skills --plugin linux45 skills in this plugin
/cisco-ios-patternsUse when reading or reviewing Cisco IOS/IOS-XE configuration, selecting read-only show commands, or planning and verifying bounded router or switch configuration work. Not for Linux host networking, bulk SSH automation, or config preflight parsing; route those to linux-network-admin, netmiko-ssh-automation, or network-config-validation./linux-access-controlUse when creating, revoking, or auditing Linux users, groups, SSH keys, sudo/wheel access, PAM settings, SELinux user mappings, or file permissions. Use linux-secrets for credential material and linux-server-hardening for broader host policy./linux-archive-integrityUse when creating, signing, encrypting, listing, comparing, or restoring metadata-preserving tar archives on Debian/Ubuntu or RHEL-family hosts. Covers ACLs, xattrs, incrementals, and verification; use linux-rsync-sync for file-tree mirrors./linux-auditd-rulesUse when inspecting, designing, testing, persisting, or querying auditd rules for forensic attribution on Debian/Ubuntu or RHEL-family hosts. Covers watches, syscalls, loss, and immutable mode; use linux-file-integrity for drift and linux-benchmark-scanning for scoring./linux-bash-scriptingUse when writing or reviewing portable sk-* Bash scripts for this engine, including common.sh primitives, flags, preview mode, and safety gates; use linux-repo-sync for Git-update behaviour and not for one-off commands./linux-benchmark-scanningUse when running read-only OpenSCAP or Lynis scans, selecting distro-matched profiles, interpreting failures, or drafting remediation on Debian/Ubuntu or RHEL-family hosts. Use linux-auditd-rules for attribution and linux-file-integrity for AIDE drift.Other plugins' skills for the same job