Linux – Which signal numbers work with the kill command

killlinux

We all know the kill command in Linux (kill -9 if some more power is needed ;) ), but what I don't understand is what are the other numbers for?

These are the numbers I know:

  1. kill -1 → Hangup (Closing window)
  2. kill -2 → Interrupt (Control + C)
  3. kill -9 → Kill
  4. kill -15 → Terminate

What are the other numbers for like 5 or 12? Is 15 the highest or can I type kill -20234?

I tried other numbers and some of them worked, but that still does not give me any understanding of what is going on under the hood or the use case.

Note: Just to be sure this is only related to Linux (and Unix)

Best Answer

What are the signal number that can be passed to kill?

kill -l lists the names of the signals.

The man page SIGNAL(7) gives an overview of the signals.

For example:

enter image description here

See the above link for a complete overview of all the signals.

Related Question