My man page does not document the difference between
kill <pid>
and
kill -9 <pid>
Since these do different things why is the -9 not documented in the kill
manpage? I thought maybe it was a shell specific things so I looked in the bash man page too but no luck.
Bonus question: what does the -9 do?
Best Answer
kill
just sends a signal to the given process. The-9
tells it which signal to send.Different numbers correspond to different common signals.
SIGINT
, for example, is 2, so to send a process theSIGINT
signal issue the commandThe manpage here specifies:
The manpage also provides a table of signals you can send. According to this table,
TERM
is15
, so these are all equivalent:Notice 9 is the
KILL
signal.