deep·tech·intuition
beginner 22 min read ·

Linux Fundamentals for Engineers

The Linux mental model every backend and DevOps engineer should carry — processes, file descriptors, signals, and the shell as glue.

The four primitives

You can model 90% of Linux with four ideas:

  1. Processes — running programs, identified by PID, organized in a tree.
  2. File descriptors — small integers naming open files, sockets, pipes.
  3. Signals — async notifications between processes (SIGTERM, SIGKILL, SIGHUP).
  4. The filesystem — the namespace through which everything is addressed, including non-files.

Everything is a file

Sockets, devices, pipes, even directories — all addressable as paths with read/write semantics. This is what makes shell composition work:

curl -s https://api.example.com/users | jq '.[] | .email' | sort -u > emails.txt

Each | is a kernel pipe — a buffered FIFO between two processes’ file descriptors. The shell wires the descriptors; the kernel does the rest.

Processes and signals

SIGTERM asks a process to clean up and exit. SIGKILL cannot be caught — the kernel just removes the process. Always trap SIGTERM in long-running services so you flush buffers, close connections, and exit cleanly.

Why this matters for application code

  • Your web server’s worker count is bounded by available file descriptors. ulimit -n matters.
  • Container orchestrators send SIGTERM then SIGKILL after a grace period. Apps that ignore SIGTERM lose data.
  • /proc/self/... is the introspection API you didn’t know existed.

Once Linux stops being magic, ops stops being scary.