Learn · Cheat sheets
Quick cheat sheets
The commands, ports and codes you reach for most — copy, print, keep handy.
Linux commands
Everyday terminal work and security checks.
Files & directories
ls -laAll files incl. hidden, with permissionscd /var/logChange directorypwdPrint working directorycat file.txtPrint a fileless /var/log/syslogPage through a large filefind / -name '*.conf' 2>/dev/nullFind files by namegrep -ri 'error' /var/logSearch text recursivelyPermissions
chmod 600 id_rsaOwner read/write onlychmod +x script.shMake executablechown user:group fileChange ownerfind / -perm -4000 2>/dev/nullFind SUID files (audit)Processes & system
ps auxAll processestop / htopLive resource monitorkill -9 PIDForce-kill a processsystemctl status sshService statusjournalctl -u ssh --since todayService logsdf -h · free -hDisk and memoryUsers & security
whoami · idCurrent user and groupssudo -lWhat sudo allowslast · lastbSuccessful / failed loginsgrep 'Failed password' /var/log/auth.logSSH brute-force tracessudo apt update && sudo apt upgradeUpdate the systemsudo ufw enable · sudo ufw statusEnable firewall and status