The terminal is the primary interface for managing Linux servers, container networks, and cloud infrastructure. While the command line provides unmatched speed and flexibility, remembering every specific flag, parameter, and syntax rule across dozens of utilities is nearly impossible.

Rather than wasting time guessing command variations or searching through fragmented forum threads, having curated cheat sheets ready can transform your command-line productivity. The reference guides curated at LinuxDork.com focus on practical, real-world terminal commands that developers and system administrators use daily.

Here is a roundup of the top command-line cheat sheets every tech enthusiast should bookmark today.

1. Essential File Manipulation & Text Processing Cheat Sheet

Text stream processing is a foundational skill in Linux administration. Manipulating configuration files, log files, and data outputs directly from the shell saves hours of manual editing.

  • grep (Search Text Patterns):
    • Search recursively ignoring case: grep -ri "error_code" /var/log/
    • Show line numbers with matches: grep -n "failed" auth.log
  • sed (Stream Editor for Text Replacement):
    • Replace text in a file in-place: sed -i 's/old_value/new_value/g' config.file
  • awk (Column and Field Processing):
    • Print the second column of a space-separated file: awk '{print $2}' data.txt
    • Filter lines where the third column exceeds a value: awk '$3 > 50' stats.csv

2. Network Diagnostics and Socket Management Cheat Sheet

When services become unresponsive or network interfaces fail, knowing how to inspect ports, routes, and DNS records quickly is crucial.

  • ss (Socket Statistics):
    • List all listening TCP and UDP sockets with process names: sudo ss -tulpn
  • ip (Network Interface & Routing Management):
    • Show network interfaces and assigned IPs: ip -c a
    • Display active default gateway routes: ip route show
  • dig (DNS Lookup Diagnostics):
    • Query specific DNS records: dig example.com A +short
    • Trace DNS resolution path from root servers: dig example.com +trace

3. Modern Process & Resource Monitoring Cheat Sheet

Keeping an eye on resource bottlenecks helps maintain system health and prevents unexpected downtime.

# View active processes sorted by memory usage
ps aux --sort=-%mem | head -n 10

# Real-time interactive resource monitor
htop

# Monitor I/O bandwidth usage per process
sudo iotop -o

Using tools like htop or btop provides visually clear graphs for CPU thread usage, system load, swap space usage, and active process trees in real time.

4. Docker & Container Management Cheat Sheet

Containerized applications require regular lifecycle maintenance, including clearing dangling images, checking container logs, and executing interactive shells within running containers.

  • Inspect live container metrics: docker stats
  • Execute an interactive shell inside a container: docker exec -it container_name /bin/bash
  • Clean up unused containers, networks, and images: docker system prune -a --volumes
  • Follow live logs for a container: docker logs -f --tail 100 container_name

5. OpenSSH Configuration & Tunneling Cheat Sheet

Managing remote connections securely goes beyond standard SSH password logins. Tunneling local ports and persisting key sessions simplifies remote server administration.

# Generate a strong SSH key pair (Ed25519)
ssh-keygen -t ed25519 -C "admin@example.com"

# Copy SSH public key to remote host for passwordless login
ssh-copy-id user@remote_host_ip

# Forward a remote database port (e.g., 5432) to localhost port 5432
ssh -L 5432:localhost:5432 user@remote_host_ip

Essential Command Quick Reference

Task DomainPrimary CommandEssential Usage Flag
Port Inspectionssss -tulpn (Lists all active listening ports)
System Storagedf / dudf -h (Disk usage) / du -sh * (Directory sizes)
Process Searchpgrep / ps`ps aux
Log Monitoringjournalctljournalctl -fu <service_name> (Follow live logs)

By keeping these quick reference commands accessible or checking out detailed tutorials on LinuxDork.com, you can troubleshoot systems faster, write cleaner automation scripts, and master the command-line interface.