Linux Directory Structure Explained (/etc, /var, /usr, /opt…)
The Linux filesystem hierarchy for server admins: what lives in /etc, /var, /usr, /opt, /home, /tmp and /proc, where configs, logs and data go, and backups.
Blog
Linux server administration: Debian, Ubuntu, AlmaLinux, storage, performance and troubleshooting.
The Linux filesystem hierarchy for server admins: what lives in /etc, /var, /usr, /opt, /home, /tmp and /proc, where configs, logs and data go, and backups.
Version-control server configuration with etckeeper: install, automatic commits on package changes, history and diffs, rolling back a file, and safe remotes.
Build a disaster recovery plan for Linux servers: RTO and RPO, what to back up, documented rebuilds, runbooks for common disasters, restore drills, upkeep.
Explore /proc for troubleshooting: CPU and memory info, load, per-process status, command lines, environment, open files and limits, and /proc/sys.
The Vim survival guide for server admins: modes, opening, editing, saving and quitting, search and replace, copy and paste, undo, and a minimal useful vimrc.
Change your own or another user’s password with passwd, force a change at next login, lock accounts, set ageing with chage, enforce strong passwords.
How hidden files work on Linux: the dot prefix, ls -a, key dotfiles like .bashrc, .ssh and .env, copying and finding them, and keeping them out of web roots.
Find which Linux distribution, release, kernel and architecture a server runs with os-release, hostnamectl and uname, plus end-of-life checks.
Set, export and persist Linux environment variables per user or system-wide, and pass them to systemd services, cron jobs and sudo.
Use netcat to test whether a TCP or UDP port is reachable, listen on a port, send raw HTTP or SMTP, transfer files between servers and check firewalls.
Diagnose high iowait: confirm it with top and vmstat, find the disk with iostat and the process with iotop, then fix swapping, slow queries and backups.
Control CPU priority with nice and renice, disk priority with ionice, set priorities for services and cron jobs, and keep backups from slowing your site.
Set up zram compressed swap with zram-tools or zram-generator, choose size and algorithm, combine it with disk swap, and check compression stats.
Compare files with diff: reading unified output, side-by-side view, ignoring whitespace, comparing directories and remote files, creating patches.
Learn bash scripting for servers: shebang, variables, quoting, conditions, loops, functions, arguments, exit codes, strict mode and a backup script.
Read systemd logs with journalctl: filter by service, time, priority and boot, follow logs live, output JSON, and limit journal disk usage on a server.
Manipulate strings in pure Bash: length, substrings, prefix and suffix removal, search and replace, case conversion, splitting, trimming and contains checks.
File descriptors 0, 1 and 2 explained: redirect output and errors with > and 2>&1, discard with /dev/null, inspect open FDs in /proc, avoid mistakes.
Read Linux memory usage correctly with free: used vs available, buffers and cache, swap, continuous monitoring, and when low memory is actually a problem.
Tell normal cache use from real memory pressure: read available memory, find the processes using RAM, tune PHP-FPM, MySQL and Java, and spot leaks.
Understand rwx permissions and octal modes like 755 and 644, use chmod with symbolic and numeric syntax, apply changes recursively and avoid chmod 777.
Share directories between Linux servers with NFS: /etc/exports, client mounts and fstab, NFSv4, firewall rules, root_squash, UIDs, and VPN-only access.
Reach private servers through a bastion with ssh -J and ProxyJump: ~/.ssh/config examples, multiple hops, scp and rsync via a jump host, bastion hardening.
Fix a Linux server that won't boot: boot stages, GRUB rescue, kernel panics, fstab and emergency mode, full disks, and access through a VPS console.