kill

The command that sends a signal to a process or job, SIGTERM by default, despite its name.

In more detail

Give it a process ID or a job spec such as %1, and name the signal, as in kill -INT, rather than using a bare number. kill -l lists the signals. kill -9 sends SIGKILL, which cannot be caught, so try TERM first and let the program clean up.

Examples

kill -TERM %1
kill -INT $$
Despite the name it does not necessarily end anything: kill -s SIGHUP 42 asks process 42 to hang up or reload, and kill -l lists signal names. Only the process owner or root can signal a process. Verify the PID, owner and parent before sending, because a correct signal to the wrong process is still an outage.

Related terms

Taught in

References