kill [-s SIGNAL | -n SIGNALNUMBER | -SIGNAL] PID|JOB
kill -l|-L [SIGNAL...]
The kill
command is used to send signals to processes specified by their PID
or their JOB
-specification.
The signal(s) to be specified can have the following formats:
SIG<name>
)SIG
-prefix (<name>
)
Without any specified signal, the command sends the SIGTERM
-signal.
The kill
command is a Bash builtin command instead of relying on the external kill
command of the operating system to
Option | Description |
---|---|
-s SIGNAL | specifies the signal to send |
-n SIGNALNUMBER | specifies the signal to send |
-SIGNAL | specifies the signal to send |
-l [SIGNAL…] | Lists supported/known signal numbers and their symbolic name. If SIGNAL is given, only list this signal, translated (if a number is given the symbolic name is printed, and vice versa) |
-L [SIGNAL…] | Same as -l [SIGNAL] (compatiblity option) |
Status | Reason |
---|---|
0 | no error/success |
!=0 | invalid option |
!=0 | invalid signal specification |
!=0 | error returned by the system function (e.g. insufficient permissions to send to a specific process) |
kill -l
kill -9 12345
kill -KILL 12345
kill -SIGKILL 12345