38
rated 0 times
[
38]
[
0]
/ answers: 1 / hits: 126173
/ 2 Years ago, mon, february 28, 2022, 3:32:48
Is there a difference between
kill -9 212121
and
kill 212121
More From » command-line
Is there a difference between
kill -9 212121
and
kill 212121
The Ubuntu man page for kill
explains the purpose of the -9
switch (admittedly in a rather choppy fashion):
Name Num Action Description
KILL 9 exit cannot be blocked
Here's what another man page says.
The command
kill
sends the specified signal to the specified process or process group. If no signal is specified, theTERM
signal is sent. TheTERM
signal will kill processes which do not catch this signal. For other processes, it may be necessary to use theKILL
(9
) signal, since this signal cannot be caught.
Therefore, using the -9
switch ensures that the process is effectively killed. Even though a frozen or unresponsive process may not respond to a simple TERM
signal, it will die when sent a KILL
signal.