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 #

Terminate a process by PID
$ 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 #

SignalMeaningWhen to use
SIGTERM (15, default)Please exit cleanlyAlways first
SIGHUP (1)Reload configurationMany daemons reload on it
SIGINT (2)What Ctrl+C sendsInteractive stops
SIGKILL (9)Immediate, uncatchable deathLast resort only
Escalate deliberately
$ 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:

Signal processes by name
$ 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.