The Dojo

Tutorials, deep dives, and insights from our team of IT professionals.

Linux Archives & Compression: tar, gzip, xz, zstd, zip

Working reference for Linux archives and compression. tar bundles, gzip / bzip2 / xz / zstd / lz4 squeeze - speed vs ratio trade-offs (zstd as modern Pareto-optimal default, gzip for compatibility, xz for tightest), tar create / extract / list flags (c / x / t / f / v / z / j / J / a auto-detect), the c-vs-x mnemonic, common --exclude patterns, the zcat / zless / zgrep family for working with compressed files in place, zip for cross-platform Windows-friendly archives, 7z for strong AES encryption, recipes (timestamped backups, archive verification, streaming over SSH, parallel compression with pigz / pbzip2 / zstd -T0). Pitfalls: tar c-vs-x mixup, recursive backup-includes-itself, re-compressing already-compressed media, xz memory hunger on small VMs, gzip removing the original.

Linux Networking Commands: ip, ss, ssh, curl, dig, tcpdump

Working reference for Linux networking from the command line. The modern iproute2 toolchain (ip a / ip r / ip link replacing ifconfig / route, ss replacing netstat, bridge replacing brctl), the killer ip route get DESTINATION command, ss flag combos for listening sockets and established connections, ping / traceroute / mtr for path diagnosis, dig +short and dig +trace for DNS, ssh with port-forward (-L / -R / -D / -J jump host) and ~/.ssh/config persistence, scp vs rsync (rsync -avPn for dry-run before destructive sync), the trailing-slash gotcha on rsync source, curl flags (-I headers / -L follow / -X POST / -v verbose), wget -c continue, and tcpdump for packet capture (-w to save for Wireshark). Pitfalls: deprecated ifconfig misleads on multi-IP, DNS-vs-network confusion, scp -P / ssh -p capital mismatch, MTU surprises over tunnels.

Linux System Monitoring: vmstat, top, iostat, sar, journalctl

Working playbook for diagnosing a slow Linux server. The 60-second triage sequence (uptime, dmesg -T, vmstat 1 5, free -h, df -h + df -i), reading load average against nproc CPU count, what each %CPU breakdown means in top (us/sy/id/wa, with iowait being the disk-pressure tell), the eight vmstat numbers that matter (r runnable, b blocked, swpd / si / so swap activity, bi / bo block I/O), available vs free memory (Linux file caching makes free deceptively small), iostat -x for per-device IOPS / await / %util, dmesg -T for kernel-level errors and OOM-killer activity, journalctl -u SERVICE -f as the systemd tail -f, sar / sysstat for historical data so you can answer 'was it slow at 3 AM yesterday', ss / lsof / strace / pmap for per-process deep dives. Pitfalls: looking at free not available, one vmstat sample is meaningless, high load isn't always CPU.

Linux Disk & Filesystem: lsblk, mount, fstab, fsck

Working reference for Linux disk and filesystem management. The four-layer model (block device > partition > filesystem > mount point), lsblk for orientation, df -h vs df -i (inode exhaustion looks like out-of-space), du and ncdu for finding disk hogs, partitioning with fdisk / parted / cfdisk (and when MBR vs GPT), mkfs for ext4 / xfs / btrfs / vfat, manual mount and umount with -l lazy and lsof / fuser to find what's blocking unmount, persistent /etc/fstab (UUID-not-device, six-field syntax, mount -a to test before reboot, nofail for non-critical), the menu of mount options (noatime, nosuid, noexec), fsck only on unmounted FS, swap setup with fallocate / mkswap / swapon. Pitfalls: out of inodes, fstab blocks boot, sdX name shift, fsck on mounted, missing chmod 600 on swap.

Linux Process Management: ps, top, kill, jobs, cron, nice

Working reference for Linux process management. ps aux vs ps -ef and the sort flags (--sort=-%mem / -%cpu), interactive viewers (top with P/M/k shortcuts, htop, btop), pstree for hierarchy, the seven signals you actually need (SIGHUP/INT/QUIT/TERM/KILL/STOP/CONT) and why SIGTERM-first-then-SIGKILL beats SIGKILL alone, killall vs pkill, foreground/background job control with & / fg / bg / disown / nohup vs the modern tmux alternative for survive-logout sessions, cron 5-field syntax with the full-paths gotcha, at for one-shots, systemd timers as the modern replacement, nice / renice / ionice for priority (counter-intuitive higher-number-equals-lower-priority). Pitfalls: SIGKILL too soon, cron silent failures, nohup doesn't imply background, parent-kill doesn't reap children.

Linux File Permissions: chmod, chown, umask, and ACLs

Working reference for Linux file permissions. The 9-bit model (user/group/other times rwx), octal shorthand (r=4 w=2 x=1, classic 755 / 644 / 600 / 700 / 777-no-please), reading the ls -l first column for file types (-, d, l, c, b, s, p), chmod numeric vs symbolic syntax, the recursive-chmod foot-gun (use find -type f vs -type d separately, or X capital), chown / chgrp ownership changes, umask defaults (022 vs 027 vs 077), the three special bits (setuid 4 / setgid 2 / sticky 1) with /tmp and /usr/bin/passwd as examples, POSIX ACLs (setfacl -m u:bob:r--) for when 9 bits arent enough. Pitfalls: chmod -R 755 on code trees, SSH 600 / 700 requirements, web-server reading uploads, setuid on scripts (ignored), and what r/w/x actually mean for directories.

Linux Text Processing: grep, awk, sed, sort, and Friends

Working reference for Linux text processing on the command line. grep with -i / -v / -r / -E / -A -B context / -c count / -l filenames-only, awk field-based ( to ) with custom -F separator and condition { action } pattern, sed s/old/new/g / -i in-place / -i.bak with backup / d for delete / p for print, sort -n / -k by column / -t separator, uniq -c -d (needs sorted input!), wc / head / tail -f / cut / tr character translations, and xargs with -0 for null-separated filenames. Real pipelines: top 10 404 IPs from nginx, active SSH users by frequency, mass sed-replace across config files. Pitfalls: grep regex vs -F fixed-string, sed -i destroys silently, tail -F (uppercase) for log rotation, xargs without -0 breaks on filenames with spaces.

Linux File & Directory Operations: ls, cd, cp, mv, rm, find

Working reference for the Linux file and directory commands you type thousands of times a year. ls with -l/-la/-lh/-ltr/-ld variations, the cd - bounce trick, mkdir -p for idempotent path creation, cp -a for archive-style copies (with the trailing-slash gotcha), mv for both rename and move, rm -rf danger and the safer find -print -> find -delete pattern, find by name/size/mtime/owner with -exec and -delete, locate vs find (locate is fast but stale), symbolic links with ln -s, the 10 commands that cover 95 percent of daily use, and the common pitfalls (rm -rf with unset variable, trailing-slash confusion, unquoted spaces in filenames).

Cisco IOS IS-IS Configuration: NET, Levels, and Backbone Routing

Working reference for IS-IS on Cisco IOS. What makes IS-IS different (runs on Layer 2 / CLNS not IP, doesn't need IP addresses to form adjacencies, carries multiple address families in one process). The NET address breakdown (AFI, area, system-id, SEL) and convention of deriving System ID from loopback. Levels: L1 intra-area, L2 backbone, L1/L2 ABR-equivalent routers, with circuit-type per-interface control. Basic configuration (net, is-type, ip router isis on interface), loopback inclusion for /32 propagation, default cost of 10 and metric-style wide for headroom, MD5 authentication. Verification (show isis neighbors / topology / database, show clns commands). IS-IS vs OSPF comparison. Pitfalls: wrong NET, circuit-type mismatch, narrow metric overflow, missing ip router isis, discontiguous L2 backbone.

Cisco IOS RIP Configuration: RIPv2, Authentication, Timers

Working reference for RIPv2 on Cisco IOS. The protocol basics (distance-vector, hop-count metric max 15, UDP 520, multicast 224.0.0.9, AD 120, 30s/180s/180s/240s timer model), why RIP is mostly retired (15-hop max, slow convergence, routing-by-rumor) and where it still fits (tiny stub networks, legacy gear). Basic configuration with the essential version 2 + no auto-summary commands, network statement (classful, no wildcard mask), passive-interface default + selective unpassive, default-information originate, MD5 authentication via key-chain, timer tuning. Loop prevention (split horizon, route poisoning, holddown), the no ip split-horizon trick on Frame Relay multipoint, RIPng per-interface enablement for IPv6. Pitfalls: forgetting version 2, no auto-summary, mismatched timers, MD5 key-id mismatch.

Cisco IOS Route Filtering: Distribution Lists, Prefix Lists, Route-Maps

Working reference for the three Cisco IOS route-filtering tools. Distribution lists with ACL or prefix-list reference for inbound/outbound filtering at the routing process boundary. Prefix lists with ge/le qualifiers for prefix-length range matching, common patterns (default route only, any prefix, host routes, /24-/28 of a /8). Route-maps with sequenced clauses, the implicit final deny and the explicit permit-anything-else fallthrough, the menu of match conditions (ip address, next-hop, route-source, interface, metric, tag, as-path, community) and set actions (next-hop, metric, local-preference, community, as-path prepend, tag, weight). Where route-maps plug in: BGP neighbors, redistribution, PBR. Route tags as the glue between protocols to prevent redistribution loops. Pitfalls: missing fallthrough, prefix-list ge/le defaults, OSPF flood-can't-be-filtered, redistribution loops without tags.

Cisco IOS Path Control: PBR, IP SLA, and Offset Lists

Working reference for Cisco IOS path-control. Policy-Based Routing (PBR) with route-maps and ACLs to override the routing table for specific traffic on inbound interfaces, locally-originated PBR via ip local policy. IP SLA active measurement with icmp-echo / tcp-connect / http probes plus the schedule command. Track objects bound to IP SLA reachability or interface line-protocol, with delay debouncing to prevent flapping. Tying a static route to a track for automatic dual-WAN failover. Offset lists to add/subtract from routing protocol metrics. The combined PBR + IP SLA + floating static pattern for resilient dual-WAN. Pitfalls: PBR applied outbound, missing fallthrough, IP SLA without schedule, track delay too short, set ip next-hop without verify-availability.