ops@toolbox:~$ linuxsignals --run

Linux Signals Reference

kill -9 and friends: every signal a sysadmin meets, with default actions and notes.

#SignalDefaultPurpose & notes
1SIGHUPterminateTerminal hangup. Repurposed by daemons as "reload config" (nginx, sshd). nohup exists to ignore it.
2SIGINTterminateCtrl-C. Polite interactive interrupt; processes may catch it to clean up.
3SIGQUITcore dumpCtrl-\. Like SIGINT but dumps core, and makes the JVM print thread stacks without dying.
4SIGILLcore dumpIllegal CPU instruction, corrupted binary or wrong-architecture code.
6SIGABRTcore dumpabort() called: assertion failures, glibc heap corruption detection ("double free").
8SIGFPEcore dumpArithmetic error, integer divide by zero, despite the floating-point name.
9SIGKILLterminateUncatchable, unblockable, immediate. No cleanup runs: no atexit, no flushing, no child reaping. Last resort, never first.
10SIGUSR1terminateApp-defined. Examples: dd prints progress; nginx reopens logs (log rotation).
11SIGSEGVcore dumpSegmentation fault (segfault), invalid memory access. In your own logs: a bug; in a vendor binary: a support ticket plus the core dump.
12SIGUSR2terminateSecond app-defined slot. nginx: begin binary upgrade.
13SIGPIPEterminateWrote to a closed pipe/socket, why `cmd | head` quietly kills cmd. Servers typically ignore it and handle EPIPE.
14SIGALRMterminatealarm() timer expired. Classic implementation of timeouts.
15SIGTERMterminateThe default of kill and what init systems send first. Catchable: apps flush, close, exit cleanly. Always try before -9.
17SIGCHLDignoreChild exited. Parents wait() on it, daemons that don't create zombies.
18SIGCONTcontinueResume a stopped process (fg/bg do this).
19SIGSTOPstopUncatchable pause, freeze a runaway process without killing it, inspect, then SIGCONT.
20SIGTSTPstopCtrl-Z, catchable version of stop, sent by the terminal.
23/29SIGURG/SIGIOignore/termSocket conditions: urgent out-of-band data / async I/O readiness.
24/25SIGXCPU/SIGXFSZcore dumpExceeded CPU or file-size rlimit, the enforcement mechanism of ulimit.
30/27SIGPWRterminatePower failure notification from a UPS daemon; init may begin shutdown.
34–64SIGRTMIN+nterminatePOSIX real-time signals: queued (not coalesced), delivered in order. systemd uses SIGRTMIN+3 for halt.

The kill escalation ladder

kill PID sends SIGTERM: a request the process can catch to shut down cleanly, flush buffers, finish the in-flight transaction, remove the pidfile. Give it seconds to act. kill -9 sends SIGKILL: the kernel simply stops scheduling the process, no handler runs, and whatever was half-written stays half-written. The professional habit is TERM, wait, then KILL, which is exactly what systemd does on systemctl stop (TERM, then KILL after TimeoutStopSec, default 90s). If a service only dies to -9, that's a bug worth filing, because every reboot is corrupting its state.

Signals as a control channel

Beyond termination, signals are the original daemon API: kill -HUP nginx reloads configuration without dropping connections, -USR1 makes nginx reopen log files (how logrotate works without restarts), and -QUIT asks for graceful worker shutdown. kill -USR1 $(pgrep dd) prints copy progress. Check a daemon's man page before assuming: HUP means "reload" to nginx and "die" to an unprepared process.

Reading exit codes

A process killed by signal N exits with status 128+N, so exit code 137 means SIGKILL (128+9), which in a container context almost always means the OOM killer or a memory limit; 139 is a segfault (128+11); 143 a clean SIGTERM death. Recognising these three numbers on sight turns many mystery crash reports into instant diagnoses. kill -l lists all signals; uncatchable ones are only KILL and STOP.

Related tools

DNS Record Types
Searchable reference of DNS record types with practical notes.
HTTP Headers Reference
Searchable reference of the HTTP request and response headers that matter in operations.
tar Command Examples
The tar invocations you actually need: create, extract, list, compress, exclude.
rsync Command Examples
The rsync invocations that matter: mirror, dry-run, delete, resume, bandwidth limits.