Question

In: Computer Science

Open a terminal a) Type ps –ef | grep bash. Record the PID. b) Open a...

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?

Solutions

Expert Solution

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


Related Solutions

What does this command do & ps -ef | grep tty | less Searches the output...
What does this command do & ps -ef | grep tty | less Searches the output from the ps command for tty and displays it one screen at a time Displays all of the interactive running processes Searches the output from the ps command for the word more Displays output from the ps command one screen at a time
Give a bash command that runs "ps -ef" , but only displays items whose UID is...
Give a bash command that runs "ps -ef" , but only displays items whose UID is not equal to root
this is bash scripting. a. Explain the difference between grep and egrep? b. Write a command...
this is bash scripting. a. Explain the difference between grep and egrep? b. Write a command to list files where third letter is x or y? c. Write command to remove array element with id 5
This lab will explore the password files. a) Open a terminal window and type less /etc/passwd....
This lab will explore the password files. a) Open a terminal window and type less /etc/passwd. Which line describes the root account? b) Type ls –l /etc/passwd. Who is the owner of the passwd file? What are the permissions? c) Type less /etc/shadow. What is in the password filed for most of these accounts? d) Type ls –l /etc/shadow. Who owns this file and how do the permissions differ from the /etc/passwd file? e) Type cat /etc/default/useradd. What is the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT