51 articles
Knowledge Base
Linux
51 articles in the Linux category · page 2 of 3.
- awk for log analysis: answer questions about an access log in one line Use awk to find top talkers, status distributions, top 404s, and per-minute error spikes in an nginx access log — on the server, without shipping the log anywhere.
- tmux: keep remote work alive across SSH drops Run long jobs on a remote server that survive your SSH connection dying. Covers the tmux session model, detach and attach, named sessions, send-keys and a minimal config.
- lsof: find what has a file or port open A practitioner guide to lsof: decode the FD column, find open files linux tools hide, hunt down what holds a port, and reclaim disk from deleted-but-open files with +L1.
- strace: find out what a hung process is actually doing A practitioner guide to using strace on a hung process: attach with -p, read the parked syscall, follow forks with -f, filter with -e trace=, and diagnose missing configs, network stalls, and lock contention.
- jq: parse and transform JSON on the command line A practitioner guide to jq json command line work: field access, array iteration, select, map, object construction, raw and CSV output, and piping curl into jq.
- Fix "Too many open files" on Linux: raise the fd limit correctly The "too many open files" error means a process hit its file descriptor limit. Diagnose the right layer and raise ulimit -n, systemd LimitNOFILE, or fs.file-max without guesswork.
- systemd service management — start, stop, enable, debug The essential systemctl commands every operator should have at fingertip speed, plus the few non-obvious flags that turn a frustrating debug session into a quick one.
- Fail2ban for SSH — banning brute-force without locking yourself out Fail2ban turns failed SSH attempts into temporary firewall bans. The configuration is straightforward; the gotchas (your own IP, IPv6, F2B vs. UFW interaction) are where the time goes.
- journalctl — reading systemd journal logs without losing your place The journal is the first thing you look at when something is wrong, and the last thing you remember the right flags for. Here is the operator-grade cheat sheet.
- UFW firewall basics — default deny, explicit allow, IPv6 included UFW is the friendliest front end to iptables/nftables on Ubuntu and Debian. Here is the production-grade baseline: default deny, named rules, IPv6 awareness, and rate limits.
- Capture and triage core dumps with systemd-coredump Make systemd-coredump catch every crash, control disk usage and retention, and pull a real backtrace from a dumped binary with coredumpctl and gdb.
- Linux user management — humans, services, and the lifecycle A clean fleet has named human users, dedicated service accounts, and no one logging in as root. Here is the model and the commands that keep it that way.
- Disabling SSH password authentication safely Turning off password SSH is a one-line config change, but doing it without locking yourself out and without breaking the cloud provider rescue path requires a small, deliberate sequence.
- SSH key authentication — generation, distribution, and lifecycle Key-based SSH is the floor for any production host, but key generation choice, distribution discipline, and rotation cadence are what determine whether your access actually stays controlled.
- Timezone and NTP on Linux — systemd-timesyncd vs chrony Every host needs a correct clock. The choice between systemd-timesyncd (simple SNTP) and chrony (full NTP) is not arbitrary — here is when each is right.
- SSH client config — host aliases and per-host settings A well-structured ~/.ssh/config replaces the tangle of bash aliases and long ssh command lines. Here is the pattern we use for fleet-scale workstations.
- Creating a sudo user on Linux — beyond adduser + usermod -aG sudo Every fleet has a "named operator" account, but the details matter: which group, what shell, what umask, what sudoers semantics, and how to revoke cleanly. Here is the production-grade pattern.
- sudo best practices — granular grants, audit trails, and visudo discipline Sudo is what gates privilege escalation on every Linux host. Used carefully, it gives you fine-grained, auditable access. Used carelessly, it is a passwordless root keystroke away.
- Linux hostname and FQDN — what every utility expects A misconfigured hostname breaks mail delivery, log forwarding, and TLS hostname verification — quietly. Here is what hostname and FQDN actually mean to every tool on the box.
- Unattended security upgrades on Debian and Ubuntu Auto-applying security patches with a sane reboot policy is the floor for a defensible fleet. Here is the configuration that keeps hosts patched without breaking them.
- Adding a swap file on Linux — sizing, swappiness, and when to skip it Swap is not the villain memes make it out to be — for sub-4 GB cloud instances it is the difference between an OOM kill and a slowdown. Here is how we size, mount, and tune it.
- SSH ProxyJump — bastion access without exposing your agent ProxyJump replaces nested ssh calls and the older ProxyCommand pattern with a clean, end-to-end-authenticated tunnel through one or more bastions. Here is the full setup.
- SSH hardening — port choice, ciphers, MACs, KEX Beyond disabling passwords, modern SSH hardening means tightening the cryptographic primitives and (sometimes) moving off port 22. Here is what actually moves the needle and what is theatre.
- SSH agent forwarding — when to use it, when to avoid it, what to use instead Agent forwarding solves the "I need my key on the bastion" problem, but exposes your agent socket to anyone with root on the bastion. Here is the safer pattern we recommend instead.