Lion Cipher Lab

Linux processes, jobs, and signals: ps, top, kill, and job control

Why it matters

Almost everything you will ever do at a Linux command line is really you starting, watching, pausing, resuming, and stopping PROCESSES — running programs the kernel tracks by number. Yet most people learn the terminal without ever learning the model underneath it, so they hit walls that feel like magic: a program freezes and Ctrl-C does nothing, a long download dies the instant they close the laptop, a server 'won't die' so they smash `kill -9` and later find corrupt files and stuck locks. Every one of those is a process-and-signals problem, and once you hold the model they stop being…

What you'll learn

Steps in this lab

  1. What a process actually is — PID, PPID, and the family tree
  2. Open a terminal and see your own processes
  3. Watch processes live with top (and htop)
  4. Job control: background with &, suspend with Ctrl-Z, jobs / fg / bg
  5. What a signal is — and sending SIGTERM, SIGKILL, SIGSTOP with kill
  6. Why background jobs die on logout — and nohup / disown
  7. trap: let a process catch SIGTERM and clean up — and prove SIGKILL can't be trapped
  8. The pro move: SIGTERM first, SIGKILL only if it won't die

Open the full interactive lab →