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:
kill -1
→ Hangup (Closing window)kill -2
→ Interrupt (Control + C)kill -9
→ Killkill -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:
See the above link for a complete overview of all the signals.