Ravi Sir's Cyber Security Cards › Revision Cards
Linux Cheat Sheet
Linux Cheat Sheet A quick revision of the key Linux commands for defenders. Packages and services ( yum / apt , service ). Logs, search ( grep ), permissions, processes, SSH and SCP. These are a defender’s daily tools: read logs, check users, fix permissions. Amazon Linux: sudo yum + sudo service .

Read card text
What this card says
What it is
A quick revision of the key Linux commands for defenders.
Key areas
Packages and services (yum/apt, service).
Logs, search (grep), permissions, processes, SSH and SCP.
Why it matters for security
These are a defender’s daily tools: read logs, check users, fix permissions.
Amazon Linux: sudo yum + sudo service. Ubuntu names can differ.
| Red team (attacker) does | Blue team (defender)… |
|---|---|
| Brute SSH password on open port 22 | Keys-only sshd; fail2ban; SG restrict source; lastb review |
| Leaves world-writable web configs | ls -la; chmod 640 secrets; non-root owner |
| Skips sudo yum update so old daemons stay open | Patch cadence; yum check-update; remove unused packages |
| Binds MySQL/SSH to 0.0.0.0 “for convenience” | ss -tulpn; bind localhost where possible; firewalld drop |
Learn more in the lesson: 49.2 Linux Cheat Sheet