Which of the followings command(s) is used to kill the login shell?

Quốc Ân

New member
Which of the followings command(s) is used to kill the login shell?
A. kill 0
B. kill -9 $$
C. kill -s KILL 0
D. kill -9 $$ and kill -s KILL 0
 
Answer: d
Explanation: A simple kill command (with TERM) will not kill the login shell. We can kill the login shell by using any of the following commands:
Code:
$ kill  -9  $$               // $$ stores the PID of current shell
$ kill  -s  KILL 0          // kills all processes including the login shell
 

Tìm kiếm

Back
Top