Ultimate Sysadmin Cheat Sheets Collection: Linux Commands, Networking, and DevOps Quick References


3 views

Every sysadmin needs these fundamental Linux command references:

# Process management
ps aux | grep [process]   # Find running processes
kill -9 [PID]            # Force kill process
top                      # Interactive process viewer

# File permissions
chmod 755 filename       # rwxr-xr-x
chown user:group file    # Change ownership

Network troubleshooting commands every admin should know:

# Basic networking
ifconfig/ip addr         # Interface configuration
netstat -tulnp           # List listening ports
traceroute domain.com    # Network path tracing

# Advanced tools
tcpdump -i eth0 port 80  # Packet capture
ss -plnt                 # Modern socket statistics

Modern infrastructure requires these references:

# AWS CLI examples
aws s3 cp file.txt s3://bucket/
aws ec2 describe-instances --filter Name=tag:Env,Values=prod

# Kubernetes basics
kubectl get pods -A
kubectl logs pod-name -n namespace

Essential security commands and configurations:

# Firewall (UFW)
ufw allow 22/tcp
ufw enable

# SSH hardening
PermitRootLogin no
PasswordAuthentication no

Common database administration snippets:

# MySQL
SHOW PROCESSLIST;
GRANT ALL PRIVILEGES ON db.* TO 'user'@'localhost';

# PostgreSQL
\dt                     # List tables
SELECT pg_size_pretty(pg_database_size('dbname'));
  • LinuxCommand.org - Comprehensive command reference
  • SS64.com - Cross-platform command index
  • DigitalOcean Community Cheat Sheets
  • GitHub gists tagged #sysadmin

During a critical server outage last year, I found myself scrambling to remember the exact journalctl flags for filtering logs by time range. That's when I realized the power of well-organized cheat sheets. Here's my curated collection:

# Process management
ps aux | grep [process]  # Find running processes
kill -9 [PID]            # Force kill process
nice -n 10 [command]     # Run with adjusted priority

# Disk space analysis
df -h                    # Human-readable disk usage
du -sh * | sort -h       # Sort directories by size
ncdu                     # Interactive disk usage analyzer
# Active Directory queries
Get-ADUser -Filter * -Properties * | Select Name,LastLogonDate
Get-ADComputer -Filter {OperatingSystem -like "*Server*"} 

# System diagnostics
Get-EventLog -LogName System -Newest 50
Test-NetConnection -ComputerName server01 -Port 3389
# Basic connectivity
traceroute -n google.com  # Unix
tracert -d google.com     # Windows

# Advanced packet analysis
tcpdump -i eth0 'port 443' -w https.pcap
tshark -Y "dns.flags.response == 1" -r capture.pcap
# Top 10 frequent errors
grep -i "error" /var/log/syslog | sort | uniq -c | sort -nr | head

# Real-time log monitoring
tail -f /var/log/nginx/access.log | awk '{print $1}' | sort | uniq -c
# AWS CLI essentials
aws ec2 describe-instances --filter Name=instance-state-name,Values=running
aws s3 ls s3://bucket-name --recursive --human-readable --summarize

# Docker troubleshooting
docker stats --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}"
docker inspect -f '{{.State.ExitCode}}' container_name