Tag: linux
All the articles with the tag "linux".
-
UFW Advanced: Rate Limiting, Logging, and Rules That Actually Make Sense
Go beyond ufw allow/deny: rate limiting with ufw limit, logging levels, before.rules for iptables, IPv6 handling, Docker bypass fixes, and fail2ban integration.
-
Bash Arrays: The Feature That Makes Scripts Readable
Declare, iterate, and manipulate arrays safely. Use indexed and associative arrays for clean bash code.
-
Bash Process Substitution: What <() and >() Actually Do
Process substitution lets you treat a command's output as a file, and feed input to a command as if it were a file. It's weird but powerful.
-
Ulimit, Cgroups, and the Art of Stopping Processes From Eating Your Server
Control runaway processes with ulimit and cgroups v2: per-process limits, systemd resource controls, Docker cgroup integration, and practical examples to prevent one service from killing your server.
-
Here Documents vs Here Strings in Bash
<<EOF syntax for multiline input, <<-EOF for indentation, <<<string for single lines. When to use each.
-
GNU parallel for Embarrassingly Parallel Tasks
GNU parallel runs tasks in parallel across CPU cores. It's faster than xargs and easier than writing a job queue. Here's when and how to use it.
-
LVM Advanced: Snapshots, Thin Provisioning, and Not Losing Your Data
Master LVM snapshots and thin provisioning on Linux. Learn to create, use, and merge snapshots for backups, and over-provision storage safely.
-
SSH Hardening: Lock Down Remote Access Without Locking Yourself Out
Harden SSH properly: disable password auth, switch to Ed25519 keys, configure sshd_config, set up SSH certificates with step-ca, add 2FA, and configure ProxyJump for bastion hosts.
-
WireGuard Is Fast, But You're Leaving Performance on the Table
WireGuard performance tuning: MTU optimization, CPU offloading, AllowedIPs routing, PersistentKeepalive tradeoffs, and iperf3 benchmarking. Squeeze every MB/s from your VPN tunnel.
-
trap in Bash: Clean Up When Your Script Dies
trap EXIT for cleanup, trap INT/TERM for graceful shutdown, trap ERR for errors. Reliable error handling.
-
Debugging Bash Scripts: set -x and Beyond
set -x prints every command before it runs. Add PS4 for context. Use trap for cleanup. Here's the toolkit every bash debugger needs.
-
Word Splitting: The Bash Gotcha That Corrupts Filenames
Unquoted variables split on IFS, breaking loops and file operations. Always quote vars. Here's why.