Resources Library
Cheat sheets, reference guides and useful bits of Linux and Unix knowledge. No gatekeeping. Occasional cryptic commands.
We're building a growing library of Linux and Unix technical references, practical examples and downloadable guides. Some sections are still being developed. Please bear with us!
π Library
π Editors
Text editors and their command languages.
π vi & Vim
Reference guides and cheat sheets for the vi family of editors.
π History of vi β timeline PDF β π Normal-mode command reference PDF β π Pocket quick reference PDF β π Vi Vim Command Crib Sheet PDF βπ Logging
π logrotate
Rotating, compressing and retaining text logs
π logrotate quick reference /etc/logrotate.conf defines global defaults; /etc/logrotate.d/ contains per-service rules. HTML β π Logrotate Reference PDF βπ rsyslog
Syslog routing, selectors and journal interaction
π rsyslog quick reference rsyslog receives messages and routes them according to rules. Facilities describe sources; severities describe prio HTML β π Rsyslog Reference PDF βπ Security
π SSH security
Keys, configuration, validation and operational safety
π OpenSSH hardening checklist Keep a working session open and ensure console access before editing remote SSH configuration. HTML β π Ssh Key Authentication PDF β π SSH public-key authentication The private key remains on the client. The server stores the public key in authorized_keys. During authentication t HTML β π Sshd Hardening PDF βπ TOTP for SSH and sudo
PAM-based one-time passwords with standard authenticator apps
π TOTP concepts and limitations The server and phone share a secret established at enrolment. Both calculate short-lived codes from the secret and HTML β π PAM TOTP deployment checklist Test in a disposable VM, snapshot it, keep a root console and an existing SSH session. Back up PAM and SSH configur HTML βπ TOTP and two-factor authentication
Time-based one-time passwords for SSH and sudo.
π How TOTP works An authenticator and server share a secret. Both calculate a short-lived code from that secret and the current time. Correct PDF β π TOTP with OpenSSH A common implementation uses libpam-google-authenticator; the name describes the PAM module, not a requirement to use Googleβ PDF β π TOTP with sudo The sudo PAM service can require a TOTP prompt using pam_google_authenticator.so. It is separate from the SSH PAM service. PDF βπ Shell
π Bash TAB completion
Interactive completion and the programmable-completion interface
π Bash Tab Completion PDF β π Bash completion essentials TAB completes commands, paths and other words. A second TAB may list alternatives depending on Readline configurati HTML β π Six completion variables COMP_WORDS is an array of parsed words. COMP_CWORD indexes the current word (zero-based). HTML βπ Storage
π Logical Volume Manager
LVM fundamentals, RAID, thin provisioning and snapshots
π LVM fundamentals A physical volume (PV) is a disk or partition initialised for LVM. A volume group (VG) pools PV capacity. A logical HTML β π Lvm Fundamentals PDF β π LVM RAID reference RAID can maintain availability after certain disk failures; it cannot replace independent, tested backups. HTML β π Lvm Raid PDF β π LVM snapshots A snapshot captures a point-in-time view of a logical volume. It is not a backup unless exported and stored indepen HTML β π Lvm Snapshots PDF β π LVM thin provisioning A thin pool stores shared physical extents; thin volumes advertise virtual capacity that may exceed currently alloc HTML β π Lvm Thin PDF β