SysOps Administrator
Overview
System administration with a strict read-first whitelist. Diagnostic commands run freely; anything that changes system state is announced and, when destructive, approved first.
Detect the OS first (Linux, macOS, or Windows) and use the matching command set below. Never run bash-only syntax in PowerShell or vice versa.
Safe diagnostic whitelist - Linux
uptime && free -h && df -h
systemctl status <service> --no-pager && systemctl --failed
journalctl -u <service> --since "1 hour ago" --no-pager
ps aux --sort=-%mem | head -15
ss -tulpn
ip addr && ip route
dig <host> && ping -c 3 <host> && traceroute <host>
docker ps && docker logs --tail 100 <container> && docker inspect <container>
openssl s_client -connect <host>:443 -servername <host> </dev/null 2>/dev/null | openssl x509 -noout -dates
last -20 && who
Safe diagnostic whitelist - macOS
uptime && vm_stat && df -h
launchctl list | grep -i <service>
log show --last 1h --predicate 'process == "<service>"' --info
ps aux -m | head -15
lsof -iTCP -sTCP:LISTEN -n -P
ifconfig && netstat -rn
dig <host> && ping -c 3 <host> && traceroute <host>
system_profiler SPSoftwareDataType SPHardwareDataType
softwareupdate --list
Safe diagnostic whitelist - Windows (PowerShell)
Get-ComputerInfo | Select-Object OsName, OsUptime, CsTotalPhysicalMemory
Get-Service <service> ; Get-Service | Where-Object Status -eq 'Stopped' | Where-Object StartType -eq 'Automatic'
Get-WinEvent -LogName System -MaxEvents 50 | Where-Object LevelDisplayName -in 'Error','Critical'
Get-Process | Sort-Object WS -Descending | Select-Object -First 15
Get-NetTCPConnection -State Listen | Select-Object LocalAddress, LocalPort, OwningProcess
Get-NetIPAddress ; Get-NetRoute
Resolve-DnsName <host> ; Test-NetConnection <host> -Port 443
Get-PSDrive -PSProvider FileSystem
Get-ChildItem Cert:\LocalMachine\My | Select-Object Subject, NotAfter
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 10
Workflow
- Detect the OS and shell (bash/zsh vs PowerShell), then baseline: load, memory, disk, failed services, recent error logs.
- Narrow down: correlate the failing service with its logs, ports, dependencies, and recent package/config changes.
- Fix with the smallest action: config reload before restart, restart before reboot.
- Verify: the service answers, the symptom is gone, nothing else broke (re-check failed services).
- For recurring issues, leave something durable: monitoring, a scheduled check (cron / launchd / Task Scheduler), log rotation, an alert.
Service management per OS
| Action |
Linux |
macOS |
Windows |
| Status |
systemctl status <svc> |
launchctl list | grep <svc> |
Get-Service <svc> |
| Logs |
journalctl -u <svc> |
log show --predicate 'process == "<svc>"' |
Get-WinEvent -ProviderName <svc> |
| Restart* |
systemctl restart <svc> |
launchctl kickstart -k <svc> |
Restart-Service <svc> |
*Restart of shared services requires human-approval.
Rules
- Require
human-approval for: rm/Remove-Item outside the workspace, shutdown/reboot/Restart-Computer, firewall changes (iptables/nft/pfctl/Set-NetFirewallRule), volume or partition operations, user/permission changes, package removals, and stopping shared services.
- Never edit a config file without keeping a
.bak copy and stating the rollback command.
- Certificates: report expiry dates proactively when inspecting TLS services.
- On Windows prefer PowerShell over cmd.exe; on macOS remember BSD userland flags differ from GNU (e.g.
ps aux -m, no free).
1---2name: sysops-administrator3description: Administer Linux, macOS, and Windows servers and VMs - services, disks, memory, processes, network, certificates, backups, patches. Whitelisted read commands; dangerous ops need approval.4metadata:5 source: https://skillmd.com/skills/navinspire-ia/sysops-administrator6 navin:7 emoji: 🖥️8 category: devops9---1011# SysOps Administrator1213## Overview1415System administration with a strict read-first whitelist. Diagnostic commands run freely; anything that changes system state is announced and, when destructive, approved first.1617**Detect the OS first** (Linux, macOS, or Windows) and use the matching command set below. Never run bash-only syntax in PowerShell or vice versa.1819## Safe diagnostic whitelist - Linux2021```bash22uptime && free -h && df -h23systemctl status <service> --no-pager && systemctl --failed24journalctl -u <service> --since "1 hour ago" --no-pager25ps aux --sort=-%mem | head -1526ss -tulpn27ip addr && ip route28dig <host> && ping -c 3 <host> && traceroute <host>29docker ps && docker logs --tail 100 <container> && docker inspect <container>30openssl s_client -connect <host>:443 -servername <host> </dev/null 2>/dev/null | openssl x509 -noout -dates31last -20 && who32```3334## Safe diagnostic whitelist - macOS3536```bash37uptime && vm_stat && df -h38launchctl list | grep -i <service>39log show --last 1h --predicate 'process == "<service>"' --info40ps aux -m | head -1541lsof -iTCP -sTCP:LISTEN -n -P42ifconfig && netstat -rn43dig <host> && ping -c 3 <host> && traceroute <host>44system_profiler SPSoftwareDataType SPHardwareDataType45softwareupdate --list46```4748## Safe diagnostic whitelist - Windows (PowerShell)4950```powershell51Get-ComputerInfo | Select-Object OsName, OsUptime, CsTotalPhysicalMemory52Get-Service <service> ; Get-Service | Where-Object Status -eq 'Stopped' | Where-Object StartType -eq 'Automatic'53Get-WinEvent -LogName System -MaxEvents 50 | Where-Object LevelDisplayName -in 'Error','Critical'54Get-Process | Sort-Object WS -Descending | Select-Object -First 1555Get-NetTCPConnection -State Listen | Select-Object LocalAddress, LocalPort, OwningProcess56Get-NetIPAddress ; Get-NetRoute57Resolve-DnsName <host> ; Test-NetConnection <host> -Port 44358Get-PSDrive -PSProvider FileSystem59Get-ChildItem Cert:\LocalMachine\My | Select-Object Subject, NotAfter60Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 1061```6263## Workflow64651. Detect the OS and shell (bash/zsh vs PowerShell), then baseline: load, memory, disk, failed services, recent error logs.662. Narrow down: correlate the failing service with its logs, ports, dependencies, and recent package/config changes.673. Fix with the smallest action: config reload before restart, restart before reboot.684. Verify: the service answers, the symptom is gone, nothing else broke (re-check failed services).695. For recurring issues, leave something durable: monitoring, a scheduled check (cron / launchd / Task Scheduler), log rotation, an alert.7071## Service management per OS7273| Action | Linux | macOS | Windows |74|---|---|---|---|75| Status | `systemctl status <svc>` | `launchctl list \| grep <svc>` | `Get-Service <svc>` |76| Logs | `journalctl -u <svc>` | `log show --predicate 'process == "<svc>"'` | `Get-WinEvent -ProviderName <svc>` |77| Restart* | `systemctl restart <svc>` | `launchctl kickstart -k <svc>` | `Restart-Service <svc>` |7879*Restart of shared services requires `human-approval`.8081## Rules8283- Require `human-approval` for: `rm`/`Remove-Item` outside the workspace, `shutdown`/`reboot`/`Restart-Computer`, firewall changes (`iptables`/`nft`/`pfctl`/`Set-NetFirewallRule`), volume or partition operations, user/permission changes, package removals, and stopping shared services.84- Never edit a config file without keeping a `.bak` copy and stating the rollback command.85- Certificates: report expiry dates proactively when inspecting TLS services.86- On Windows prefer PowerShell over cmd.exe; on macOS remember BSD userland flags differ from GNU (e.g. `ps aux -m`, no `free`).