Difference between `kill -9 ` and `kill -INT `?
Clash Royale CLAN TAG#URR8PPP
up vote
5
down vote
favorite
I cannot figure out what the difference is between
kill -9 <pid>
and
kill -INT <pid>
can anyone explain it to me like I am 3 years old?
kill signals
add a comment |Â
up vote
5
down vote
favorite
I cannot figure out what the difference is between
kill -9 <pid>
and
kill -INT <pid>
can anyone explain it to me like I am 3 years old?
kill signals
2
kill -INT $pid
is like sticking a rod through pid to see what happens. Maybe it'll die, maybe it won't.kill -9 $pid
will kill pid with fire and it absolutely will not stop until pid is dead.
â PSkocik
Oct 20 '17 at 21:19
lol that will def help a 3 year old understand :)
â Alexander Mills
Oct 20 '17 at 21:47
@PSkocik, Hilarious. Like a fairy tale fable about thekill
command. Love it!
â RobertL
Oct 23 '17 at 20:50
Can -9 also be represent by a "string", such askill -KILL
or something?
â Alexander Mills
Oct 23 '17 at 21:33
1
@AlexanderMills yes, see "Advanced Concepts" in the answer below.
â RobertL
Oct 26 '17 at 3:38
add a comment |Â
up vote
5
down vote
favorite
up vote
5
down vote
favorite
I cannot figure out what the difference is between
kill -9 <pid>
and
kill -INT <pid>
can anyone explain it to me like I am 3 years old?
kill signals
I cannot figure out what the difference is between
kill -9 <pid>
and
kill -INT <pid>
can anyone explain it to me like I am 3 years old?
kill signals
edited Oct 20 '17 at 21:16
Jeff Schaller
32.1k849109
32.1k849109
asked Oct 20 '17 at 21:09
Alexander Mills
1,9441029
1,9441029
2
kill -INT $pid
is like sticking a rod through pid to see what happens. Maybe it'll die, maybe it won't.kill -9 $pid
will kill pid with fire and it absolutely will not stop until pid is dead.
â PSkocik
Oct 20 '17 at 21:19
lol that will def help a 3 year old understand :)
â Alexander Mills
Oct 20 '17 at 21:47
@PSkocik, Hilarious. Like a fairy tale fable about thekill
command. Love it!
â RobertL
Oct 23 '17 at 20:50
Can -9 also be represent by a "string", such askill -KILL
or something?
â Alexander Mills
Oct 23 '17 at 21:33
1
@AlexanderMills yes, see "Advanced Concepts" in the answer below.
â RobertL
Oct 26 '17 at 3:38
add a comment |Â
2
kill -INT $pid
is like sticking a rod through pid to see what happens. Maybe it'll die, maybe it won't.kill -9 $pid
will kill pid with fire and it absolutely will not stop until pid is dead.
â PSkocik
Oct 20 '17 at 21:19
lol that will def help a 3 year old understand :)
â Alexander Mills
Oct 20 '17 at 21:47
@PSkocik, Hilarious. Like a fairy tale fable about thekill
command. Love it!
â RobertL
Oct 23 '17 at 20:50
Can -9 also be represent by a "string", such askill -KILL
or something?
â Alexander Mills
Oct 23 '17 at 21:33
1
@AlexanderMills yes, see "Advanced Concepts" in the answer below.
â RobertL
Oct 26 '17 at 3:38
2
2
kill -INT $pid
is like sticking a rod through pid to see what happens. Maybe it'll die, maybe it won't. kill -9 $pid
will kill pid with fire and it absolutely will not stop until pid is dead.â PSkocik
Oct 20 '17 at 21:19
kill -INT $pid
is like sticking a rod through pid to see what happens. Maybe it'll die, maybe it won't. kill -9 $pid
will kill pid with fire and it absolutely will not stop until pid is dead.â PSkocik
Oct 20 '17 at 21:19
lol that will def help a 3 year old understand :)
â Alexander Mills
Oct 20 '17 at 21:47
lol that will def help a 3 year old understand :)
â Alexander Mills
Oct 20 '17 at 21:47
@PSkocik, Hilarious. Like a fairy tale fable about the
kill
command. Love it!â RobertL
Oct 23 '17 at 20:50
@PSkocik, Hilarious. Like a fairy tale fable about the
kill
command. Love it!â RobertL
Oct 23 '17 at 20:50
Can -9 also be represent by a "string", such as
kill -KILL
or something?â Alexander Mills
Oct 23 '17 at 21:33
Can -9 also be represent by a "string", such as
kill -KILL
or something?â Alexander Mills
Oct 23 '17 at 21:33
1
1
@AlexanderMills yes, see "Advanced Concepts" in the answer below.
â RobertL
Oct 26 '17 at 3:38
@AlexanderMills yes, see "Advanced Concepts" in the answer below.
â RobertL
Oct 26 '17 at 3:38
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
8
down vote
accepted
kill -INT $pid
sends the "interrupt" signal to the process with process ID pid
. However, the process may decide to ignore the signal, or catch the signal and do something before exiting and/or ignore it.
kill -9 $pid
sends the "kill" signal which cannot be caught or ignored. The process will be forcibly shut down with no notification to the process, and no chance to do any cleanup what so ever. kill -9 $pid
should almost never be recommended or used, though sometimes it's necessary.
Advanced Concepts
kill -INT $pid
is the same as kill -2 $pid
.kill -9 $pid
is the same as kill -KILL $pid
There are many versions of the kill
command. Most shells (ksh, bash, dash, etc) have built-in kill
commands, and there's also one in /bin/kill
. They are all slightly different but most of them support the above examples.
Most kill commands have a -l
or -L
option to list the signals:
$ /bin/kill -L
1 HUP 2 INT 3 QUIT 4 ILL 5 TRAP 6 ABRT 7 BUS
8 FPE 9 KILL 10 USR1 11 SEGV 12 USR2 13 PIPE 14 ALRM
15 TERM 16 STKFLT 17 CHLD 18 CONT 19 STOP 20 TSTP 21 TTIN
22 TTOU 23 URG 24 XCPU 25 XFSZ 26 VTALRM 27 PROF 28 WINCH
29 POLL 30 PWR 31 SYS
$
A good place to read about signals is the "signal" man page in section 7 of the manual: man 7 signal
.
4
kill -9
may also be writtenkill -KILL
.
â Kusalananda
Oct 20 '17 at 21:43
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
8
down vote
accepted
kill -INT $pid
sends the "interrupt" signal to the process with process ID pid
. However, the process may decide to ignore the signal, or catch the signal and do something before exiting and/or ignore it.
kill -9 $pid
sends the "kill" signal which cannot be caught or ignored. The process will be forcibly shut down with no notification to the process, and no chance to do any cleanup what so ever. kill -9 $pid
should almost never be recommended or used, though sometimes it's necessary.
Advanced Concepts
kill -INT $pid
is the same as kill -2 $pid
.kill -9 $pid
is the same as kill -KILL $pid
There are many versions of the kill
command. Most shells (ksh, bash, dash, etc) have built-in kill
commands, and there's also one in /bin/kill
. They are all slightly different but most of them support the above examples.
Most kill commands have a -l
or -L
option to list the signals:
$ /bin/kill -L
1 HUP 2 INT 3 QUIT 4 ILL 5 TRAP 6 ABRT 7 BUS
8 FPE 9 KILL 10 USR1 11 SEGV 12 USR2 13 PIPE 14 ALRM
15 TERM 16 STKFLT 17 CHLD 18 CONT 19 STOP 20 TSTP 21 TTIN
22 TTOU 23 URG 24 XCPU 25 XFSZ 26 VTALRM 27 PROF 28 WINCH
29 POLL 30 PWR 31 SYS
$
A good place to read about signals is the "signal" man page in section 7 of the manual: man 7 signal
.
4
kill -9
may also be writtenkill -KILL
.
â Kusalananda
Oct 20 '17 at 21:43
add a comment |Â
up vote
8
down vote
accepted
kill -INT $pid
sends the "interrupt" signal to the process with process ID pid
. However, the process may decide to ignore the signal, or catch the signal and do something before exiting and/or ignore it.
kill -9 $pid
sends the "kill" signal which cannot be caught or ignored. The process will be forcibly shut down with no notification to the process, and no chance to do any cleanup what so ever. kill -9 $pid
should almost never be recommended or used, though sometimes it's necessary.
Advanced Concepts
kill -INT $pid
is the same as kill -2 $pid
.kill -9 $pid
is the same as kill -KILL $pid
There are many versions of the kill
command. Most shells (ksh, bash, dash, etc) have built-in kill
commands, and there's also one in /bin/kill
. They are all slightly different but most of them support the above examples.
Most kill commands have a -l
or -L
option to list the signals:
$ /bin/kill -L
1 HUP 2 INT 3 QUIT 4 ILL 5 TRAP 6 ABRT 7 BUS
8 FPE 9 KILL 10 USR1 11 SEGV 12 USR2 13 PIPE 14 ALRM
15 TERM 16 STKFLT 17 CHLD 18 CONT 19 STOP 20 TSTP 21 TTIN
22 TTOU 23 URG 24 XCPU 25 XFSZ 26 VTALRM 27 PROF 28 WINCH
29 POLL 30 PWR 31 SYS
$
A good place to read about signals is the "signal" man page in section 7 of the manual: man 7 signal
.
4
kill -9
may also be writtenkill -KILL
.
â Kusalananda
Oct 20 '17 at 21:43
add a comment |Â
up vote
8
down vote
accepted
up vote
8
down vote
accepted
kill -INT $pid
sends the "interrupt" signal to the process with process ID pid
. However, the process may decide to ignore the signal, or catch the signal and do something before exiting and/or ignore it.
kill -9 $pid
sends the "kill" signal which cannot be caught or ignored. The process will be forcibly shut down with no notification to the process, and no chance to do any cleanup what so ever. kill -9 $pid
should almost never be recommended or used, though sometimes it's necessary.
Advanced Concepts
kill -INT $pid
is the same as kill -2 $pid
.kill -9 $pid
is the same as kill -KILL $pid
There are many versions of the kill
command. Most shells (ksh, bash, dash, etc) have built-in kill
commands, and there's also one in /bin/kill
. They are all slightly different but most of them support the above examples.
Most kill commands have a -l
or -L
option to list the signals:
$ /bin/kill -L
1 HUP 2 INT 3 QUIT 4 ILL 5 TRAP 6 ABRT 7 BUS
8 FPE 9 KILL 10 USR1 11 SEGV 12 USR2 13 PIPE 14 ALRM
15 TERM 16 STKFLT 17 CHLD 18 CONT 19 STOP 20 TSTP 21 TTIN
22 TTOU 23 URG 24 XCPU 25 XFSZ 26 VTALRM 27 PROF 28 WINCH
29 POLL 30 PWR 31 SYS
$
A good place to read about signals is the "signal" man page in section 7 of the manual: man 7 signal
.
kill -INT $pid
sends the "interrupt" signal to the process with process ID pid
. However, the process may decide to ignore the signal, or catch the signal and do something before exiting and/or ignore it.
kill -9 $pid
sends the "kill" signal which cannot be caught or ignored. The process will be forcibly shut down with no notification to the process, and no chance to do any cleanup what so ever. kill -9 $pid
should almost never be recommended or used, though sometimes it's necessary.
Advanced Concepts
kill -INT $pid
is the same as kill -2 $pid
.kill -9 $pid
is the same as kill -KILL $pid
There are many versions of the kill
command. Most shells (ksh, bash, dash, etc) have built-in kill
commands, and there's also one in /bin/kill
. They are all slightly different but most of them support the above examples.
Most kill commands have a -l
or -L
option to list the signals:
$ /bin/kill -L
1 HUP 2 INT 3 QUIT 4 ILL 5 TRAP 6 ABRT 7 BUS
8 FPE 9 KILL 10 USR1 11 SEGV 12 USR2 13 PIPE 14 ALRM
15 TERM 16 STKFLT 17 CHLD 18 CONT 19 STOP 20 TSTP 21 TTIN
22 TTOU 23 URG 24 XCPU 25 XFSZ 26 VTALRM 27 PROF 28 WINCH
29 POLL 30 PWR 31 SYS
$
A good place to read about signals is the "signal" man page in section 7 of the manual: man 7 signal
.
edited Oct 26 '17 at 3:37
answered Oct 20 '17 at 21:36
RobertL
4,685523
4,685523
4
kill -9
may also be writtenkill -KILL
.
â Kusalananda
Oct 20 '17 at 21:43
add a comment |Â
4
kill -9
may also be writtenkill -KILL
.
â Kusalananda
Oct 20 '17 at 21:43
4
4
kill -9
may also be written kill -KILL
.â Kusalananda
Oct 20 '17 at 21:43
kill -9
may also be written kill -KILL
.â Kusalananda
Oct 20 '17 at 21:43
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f399438%2fdifference-between-kill-9-pid-and-kill-int-pid%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
2
kill -INT $pid
is like sticking a rod through pid to see what happens. Maybe it'll die, maybe it won't.kill -9 $pid
will kill pid with fire and it absolutely will not stop until pid is dead.â PSkocik
Oct 20 '17 at 21:19
lol that will def help a 3 year old understand :)
â Alexander Mills
Oct 20 '17 at 21:47
@PSkocik, Hilarious. Like a fairy tale fable about the
kill
command. Love it!â RobertL
Oct 23 '17 at 20:50
Can -9 also be represent by a "string", such as
kill -KILL
or something?â Alexander Mills
Oct 23 '17 at 21:33
1
@AlexanderMills yes, see "Advanced Concepts" in the answer below.
â RobertL
Oct 26 '17 at 3:38