← Script House Quick Reference

Sysadmin Command Reference

Process Management

ps aux
List all running processes with CPU/MEM usage
ps aux | grep nginx
Find a specific process by name
top
Real-time process monitor (q to quit)
kill PID
Send SIGTERM to gracefully stop a process
kill -9 PID
Force-kill a process (SIGKILL)
pkill -u USER
Kill all processes owned by a user
nice -n 10 CMD
Run command with lower priority
nohup CMD &
Run process that survives logout
Pro Tip
Signal 15 (SIGTERM) lets a process clean up before exiting. Signal 9 (SIGKILL) is immediate -- use it only as a last resort because the process cannot save state.

Service Management (systemd)

systemctl status SVC
Check if a service is active, loaded, enabled
systemctl start SVC
Start a stopped service
systemctl stop SVC
Stop a running service
systemctl restart SVC
Stop then start (brief downtime)
systemctl reload SVC
Reload config without stopping
systemctl enable SVC
Start on boot (creates symlink)
systemctl list-units
List all loaded services
systemctl --failed
Show failed services
Reload vs Restart
Use reload when you change a config file (zero downtime). Use restart when you update the binary or need a full reset. Not all services support reload.

Disk & Storage

df -h
Disk space usage (human-readable)
du -sh DIR
Size of a directory
lsblk
List block devices (disks & partitions)
mount
Show mounted filesystems
fdisk -l
List partition tables
free -h
RAM and swap usage
Emergency
If /var is at 100%, check du -sh /var/log/* first. Compress or rotate old logs. Never delete files a running process has open -- truncate instead: truncate -s 0 /var/log/syslog

Network Commands

ip addr show
Show IP addresses on all interfaces
ip route show
Display routing table
ss -tlnp
Listening TCP ports with process names
ping -c 4 HOST
Test connectivity (4 packets)
dig DOMAIN
DNS lookup with full details
curl -I URL
Fetch HTTP headers only
traceroute HOST
Trace the network path to a host
netstat -tulnp
Legacy: listening ports (use ss instead)
Modern vs Legacy
ip replaces ifconfig. ss replaces netstat. The old tools still work but are deprecated on modern distros. Learn the new ones -- they are faster and more feature-rich.

Try It Live

Click any command card to paste it here, or type your own.