grep -rl "#linux" ~/writing ~/notes
#linux
4 posts and 10 notes tagged linux.
20264 posts
- 8 min
FreeBSD, NetBSD, OpenBSD and DragonFlyBSD: what actually differs
Same 4.4BSD skeleton, four different answers to what to optimise: kernel locking, filesystems, security models, architecture coverage, and how each project runs Linux binaries.
- 9 min
Debugging a systemd service without guessing
A repeatable path from failed unit to useful evidence using systemctl, journalctl, exit status, and the unit's real runtime context.
- 7 min
Write boring shell scripts
A few conventions that make small Bash automation safer to rerun, easier to debug, and less surprising six months later.
- 8 min
Linux load average is not CPU usage
Why a high load average can point at CPU pressure, blocked I/O, or scheduling pressure—and what to inspect next.
Notes
- TIL
Stop grep matching itself without grep -v grep
ps aux | grep nginx always lists the grep nginx process too, which is why | grep -v grep is so common. Wrap one character of the pattern in brackets instead:…
- TIL
ldd may run the binary you are inspecting
ldd is not a parser. It is a shell script that asks the dynamic loader to trace itself — normally by running the loader with --list, and in some versions and…
- TIL
MemoryHigh is a slope, MemoryMax is a cliff
A container that runs out of memory did not run out of machine memory — it hit a limit recorded under /sys/fs/cgroup, which is why free -h inside the container…
- TIL
Core dumps are free until you need one
The kernel refuses to write core dumps by default (RLIMIT_CORE starts at 0), which is why production crashes usually leave nothing behind. systemd raises that…
- TIL
Give AI agents privileged access with pkexec
AI coding agents usually run unprivileged and stall when they need root — installing a package, writing under /etc, restarting a service. Instead of running…
- TIL
Find and kill the process using a TCP port
When a port is already in use, find who owns it before reaching for a reboot: ss -ltnp shows the PID in the users:(...) column (use sudo to see other users'…
- TIL
perf counts, perf samples — pick the right one
perf has two modes and they answer different questions. Decide which one you are asking before you collect anything. Count when the question is how much:…
- TIL
Deleted files can still fill a disk
When df says a filesystem is full but du can't find the space, a process is usually holding a deleted file open. The blocks aren't freed until the last file…
- TIL
Ask the package manager what changed on disk
Every package manager already stores checksums for the files it installed, which turns "has anything been modified since installation?" into one command…
- TIL
Measure durations with the monotonic clock
Linux has several clocks, and mixing them up is a reliable way to ship a bug that only appears in production. CLOCK_REALTIME is the wall clock: NTP,…