Monday 30 December 2013

Kill a Process in Unix

In UNIX and OSX, you can kill a process from the command line using the "kill" command.

kill -9 PID

The PID (Process ID) can be found by using ps -ef command.

Eg:

ps -ef | grep jrockit

The output will show the Process ID. Let's say , for instance it's 4519.

Then you can kill the process by using :

kill -9 4519

-9 is basically a signal (SIGKILL) to be used with the kill command. The default signal is -15 i.e SIGTERM which is milder signal to terminate a process.

More detailed information about kill signals can be found here.

Technorati cliam token USM62NJ7A438

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...
eXTReMe Tracker