Linux command reference
A compact operational reference for daily server work and first-response troubleshooting.
Use this page after you understand the commands. Copying an unfamiliar destructive or privileged command into production is not an operating procedure.
System state
Package management by family
Files and text
Archives and transfers
Inspect an archive before extracting it as root. For full server copies, confirm filesystem, ACL, extended-attribute, and hard-link requirements before choosing rsync flags.
Identities and permissions
Processes and scheduled work
Services and logs
Network and HTTP
For RHEL-family firewalls, inspect sudo firewall-cmd --list-all instead of UFW. A successful TCP connection does not prove the application is healthy; follow it with an HTTP or protocol-specific check.
Storage and disk pressure
When df reports a full disk but du cannot account for the space, look for deleted-open files with lsof +L1 and check container storage.
Containers
Security checks
Treat this output as evidence to review, not a pass/fail security scan. Compare it with the server's intended ports, users, and policy.
Where to start
| Symptom | First commands |
|---|---|
| Site unavailable | dig +short, nc -vz HOST 443, curl -vI |
| Nginx 502 | ss -ltnp, local curl, Nginx error log, service journal |
| SSH timeout | provider status, cloud firewall, route, UFW, SSH listener |
| Permission denied | id, namei -l PATH, stat, service user |
| Disk full | df -hT, du, lsof +L1, journalctl --disk-usage |
| Process disappeared | systemctl status, journalctl -u, kernel OOM log |
| Container restart loop | docker compose ps, logs, inspect, health check |
Safe configuration change
Check before running a risky command
For rm, chmod, chown, firewall rules, database changes, and recursive operations: resolve the target, preview where possible, keep a recovery path, and know how to verify success.
Continue learning
- Return to Linux foundations for command semantics.
- Use Services and networking to trace traffic.
- Follow Operations and recovery during an incident.