What are the most important signals for process management?
Know SIGTERM (15, polite kill), SIGKILL (9, force-kill, uncatchable), SIGHUP (1, reload config), SIGINT (2, Ctrl+C) and SIGSTOP/SIGCONT (pause/resume).
* SIGTERM first (graceful, catchable cleanup); escalate to SIGKILL (-9) only if it stays stuck — that forces death with no cleanup. *
These are the handful of signals a sysadmin actually uses day to day:
| Signal | # | Default action | What it's for |
|---|---|---|---|
| SIGHUP | 1 | Term | Originally "terminal hung up"; daemons reinterpret it as reload config |
| SIGINT | 2 | Term | Interrupt from the keyboard (Ctrl+C) |
| SIGQUIT | 3 | Core | Quit and dump core (Ctrl+\) |
| SIGKILL | 9 | Term | Force-kill — cannot be caught or ignored |
| SIGTERM | 15 | Term | Polite "please shut down" — the default for kill |
| SIGSTOP | 19 | Stop | Pause — cannot be caught or ignored |
| SIGTSTP | 20 | Stop | Terminal stop (Ctrl+Z) — can be caught |
| SIGCONT | 18 | Cont | Resume a stopped process |
Why SIGTERM before SIGKILL? SIGTERM lets the process run its cleanup handler — flush buffers, close files, remove lock files — then exit gracefully. SIGKILL is delivered by the kernel and the process never sees it, so there's no cleanup; you can be left with corrupted data or stale locks. Hence the order:
kill PID(SIGTERM) — ask nicely- wait a few seconds
kill -9 PID(SIGKILL) — only if it's truly stuck
Note the SIGTSTP (20, Ctrl+Z) / SIGSTOP (19) pair: both pause, but Ctrl+Z's SIGTSTP can be intercepted by a program, whereas SIGSTOP cannot.
Mnemonic: 9 and 19 are the two "unstoppable" signals — a process can never block SIGKILL or SIGSTOP.
Go deeper:
signal(7) man page (man7.org) — the numbers and default dispositions of SIGHUP(1), SIGINT(2), SIGKILL(9), SIGTERM(15), SIGSTOP(19), SIGCONT(18).