In: Computer Science
Open a terminal
a) Type ps –ef | grep bash. Record the PID.
b) Open a second terminal (leaving the first active) and type kill
–l to see the available kill signals
c) Type kill -2 (# of the recorded PID). Did the first terminal
session close?
d) Type kill -3 (# of the recorded PID). Did the first terminal
session close?
e) Type kill -15 (# of the recorded PID). Did the first terminal
session close?
f) Type kill -9 (# of the recorded PID). Did the first terminal
session close?
g) Explain why the one that worked, worked.
h) Describe when an administrator would use the kill command?
i) Compare the kill command to TaskManager in Windows. Does Windows
have process ID?
Answer a
*************
Answer B
***************
Answer C
**************
session not killed
Answer D
**************
session not killed
Answer E
*************
session killed
Answer F
**************
session killed
Answer G
*************
if you see the kill -l output you will see on the 9th and 15 positions SIGTERM and SIGKILL are used to terminate the session and kill the process.
Answer H
***************
When users have no rights to kill or any user who is doing some suspicious activity or his/her machine is not responding at that time administrator would use the kill command.
Answer I
****************
in windows its end task to kill the process and it's easy to end the process because it's GUI based.
Thanks