The kill builtin command

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:

  • Numerical: The signal is specified using its constant numeric value. Be aware that not all systems have identical numbers for the signals.
  • Symbolic (long): The signal is specified using the same name that is used for the constant/macro in the C API (SIG<name>)
  • Symbolic (short): The signal is specified using the name from the C API without the 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

  • be able to use shell job specifications instead of Unix process IDs
  • be able to send signals ("kill something") also, when your process limit is reached
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

  • POSIX(R) and ISO C only standardize symbolic signal names (no numbers) and a default action
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information
You could leave a comment if you were logged in.
  • commands/builtin/kill.txt
  • Last modified: 2015/11/14 07:13
  • by thebonsai