kill sends signals to processes. The name is misleading — its default job is to ask a program to stop politely, and only in emergencies to force it. Knowing the difference is what separates a clean shutdown from corrupted state.
The polite default #
$ kill 4173
That sends SIGTERM: "please finish up and exit". Well-behaved programs save state, close files, and leave. Give it a few seconds before escalating.
The signal ladder #
| Signal | Meaning | When to use |
|---|---|---|
SIGTERM (15, default) | Please exit cleanly | Always first |
SIGHUP (1) | Reload configuration | Many daemons reload on it |
SIGINT (2) | What Ctrl+C sends | Interactive stops |
SIGKILL (9) | Immediate, uncatchable death | Last resort only |
$ kill 4173
$ kill -9 4173
SIGKILL cannot be caught, so the process gets no chance to flush or clean up. Data written by a killed program may be half-saved; that is the price of the emergency exit.
By name instead of PID #
PIDs come from ps or pgrep. killall and pkill skip that step and take names:
$ pkill -f aospix-worker
$ killall -TERM chromium
Only your own processes are fair game; signalling another user's work needs sudo, and the system will say so.
Escalation is also visible inside top — press k there and it asks for the same signal number. More in the journal.
