 |
|
Oracle Tips by Burleson |
Kill a Process
This section is rated "R" for violence (just kidding).
When you need to terminate a process, you use the kill
command. The kill command sends a termination signal to the
process or group specified. The default is to send a TERM (15)
signal to the process(es). However, a process can be
programmed to trap signals and perform specific functions, or
ignore the signal entirely.
Below we see the xscreensaver process (2609) which we want to
terminate.
pgrep xscreen
2609
kill 2609
When you have a stubborn process which is trapping your kill
command and refuses to terminate, use the -9 signal to kill the
process. The -9 signal cannot be trapped by a process and
ignored. If the xscreensaver process did not terminate after the
last kill command, we would then enter:
kill -9 2609
The above book excerpt is from:
Easy Linux
Commands
Working Examples of Linux Command Syntax
ISBN:
0-9759135-0-6
Terry Clark
http://www.rampant-books.com/book_2005_1_linux_commands.htm |