What's the difference between 'killall' and 'pkill'?

Posted by jgbelacqua on Ask Ubuntu See other posts from Ask Ubuntu or by jgbelacqua
Published on 2011-02-22T07:31:17Z Indexed on 2011/02/22 7:33 UTC
Read the original article Hit count: 282

Filed under:
|

After using just plain kill <some_pid> on Unix systems for many years, I learned pkill from a younger Linux-savvy co-worker colleague1.

I soon accepted the Linux-way, pgrep-ing and pkill-ing through many days and nights, through slow-downs and race conditions. This was all well and good.

But now I see nothing but killall . How-to's seem to only mention killall, and I'm not sure if this is some kind of parallel development, or if killall is a successor to pkill, or something else.

It seems to function as more targeted pkill, but I'm sure I'm missing something.

Can an Ubuntu/Debian-savvy person explain when (or why) killall should be used, especially if it should be used in preference to pkill (when pkill often seems easier, because I can be sloppier with name matching, at least by default).

1 'colleague' is free upgrade from 'co-worker', so might as well.

© Ask Ubuntu or respective owner

Related posts about command-line

Related posts about process