Syed Jahanzaib Personal Blog to Share Knowledge !

March 11, 2010

*nIX KILL: howto terminate a process using kill

Filed under: Linux Related — Syed Jahanzaib / Pinochio~:) @ 6:27 AM

Use ps command or pidof command to find out process ID (PID). Syntax:
ps aux | grep processname
pidof processname

For example if process name is yum, you can use any one of the following command to obtain process ID:
# ps aux | grep yum

OR use pidof command which is use to find the process ID of a running program:
# pidof yum

kill process using PID (process id)

Above command tell you PID (3486) of lighttpd process. Now kill process using this PID:
# kill 3486
# kill -9 3486

  • -9 is special Kill signal, which will kill the process.

killall command examples

You can also use killall command. The killall command kill processes by name (no need to find PID):
# killall -9 yum

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: