Linux & Bash — Fundamentals
Most commands below that install software, manage services, or touch files outside your own home directory need sudo — a fresh shell session is not root by default. Where a command needs it, it's shown with sudo; where it doesn't (plain reads of your own files/processes), it's shown without.
The filesystem hierarchy that actually matters day to day
/etc — configuration files. Almost every service's config lives here (/etc/nginx/, /etc/systemd/).
/var — variable data: logs (/var/log), application data that changes at runtime.
/opt — third-party applications installed outside the standard package manager's usual locations.
/proc — a virtual filesystem exposing live kernel/process information (not real files on disk) — cat /proc/cpuinfo, /proc//status .
/sys — another virtual filesystem, exposing kernel/hardware/device interfaces.
Knowing which of these is a real, persistent location vs. a virtual, kernel-generated view (/proc, /sys) matters practically — writing to certain /proc entries changes live kernel behavior immediately, and files there don't represent anything actually stored on disk.
Permissions: owner/group/other, and what the numbers mean
Each digit is a sum: read=4, write=2, execute=1. 644 = owner gets 4+2=6 (rw-), group and other get 4 (r--). This arithmetic is worth being genuinely fluent in — reconstructing a permission mode from first principles under time pressure (in an interview, or mid-incident) is much slower than having it memorized.
Special permission bits, beyond the standard rwx:
A SUID bit on a writable script (as opposed to a compiled binary) is a real, common privilege-escalation risk worth being deliberate about — it's a legitimate mechanism (see passwd above) but an easy one to apply somewhere it shouldn't be.
Package management, across distros
Knowing which family a given server belongs to (Debian-based vs. RHEL-based) determines which of these actually works — a common, avoidable early mistake is running apt commands against a RHEL-family box or vice versa. cat /etc/os-release is the fast way to confirm which family you're on before running anything.
systemd: managing services on modern Linux
Use systemctl, not the older service command, on any modern Linux distribution — service is a legacy compatibility shim on systemd-based systems and doesn't expose systemd's actual state/dependency information the way systemctl does directly.
Users, groups, and sudo
sudo grants specific, configurable elevated permissions (via /etc/sudoers or /etc/sudoers.d/) rather than an all-or-nothing root login — the principle of least privilege applied at the OS level, and the reason disabling direct root SSH login while enabling scoped sudo access is standard production hardening, not just convention.
Finding your way around a server you've never touched before
None of these need sudo — they're all read-only views of system/process state. This sequence — establish what OS/kernel you're on, then check disk/memory/load at a glance — is the standard, fast first orientation on any unfamiliar server, before diving into anything more specific.

