Last Updated: February 25, 2016
·
1.245K
· Chao Yang

pgrep & pkill.

pgrep and pkill make life easier when you need to find a process' id or kill it:

# This is the same as pidof.
$ pgrep pidgin
# This is a better sulotion for kill a process instead of find the pid and kill it.
$ pkill pidgin

3 Responses
Add your response

I used to use these command, but after switching to zsh, I can use autocompletion. so I can type 'kill (tab) (tab)' and choose by process name, or type 'kill firefox(tab)'

over 1 year ago ·

@gahtune
I heard of that zsh is more powerful than bash, but never try it. Maybe I need to start now ;)

over 1 year ago ·

@gahtune should try it and stop using pidof :)

over 1 year ago ·