Friday, May 3, 2024
38
rated 0 times [  38] [ 0]  / answers: 1 / hits: 126172  / 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

 Answers
1

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, the TERM signal is sent. The TERM signal will kill processes which do not catch this signal. For other processes, it may be necessary to use the KILL (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.


[#35761] Tuesday, March 1, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
feeous

Total Points: 102
Total Questions: 122
Total Answers: 119

Location: Netherlands
Member since Thu, Jul 1, 2021
3 Years ago
;