Linux Tutorial Series

Linux Tutorial Series – 104 – The pgrep and pkill commands

Here is the video version, if you prefer it:

Today, I will just throw a bug in your ear (this is a colloquialism in Croatia for “useful for you to know”) and tell you about two commands I have used – pgrep and pkill.

You most likely won’t be needing those commands in most cases, but sometimes you know only the process name, but don’t know its ID and you want to end the process. Then you can use pgrep in combination with xargs (see here: (“Can I chain pgrep with kill?,” n.d.)⁠) or use pkill with the process name as the argument (“pkill(1) – Linux man page,” n.d.)⁠.

Hope you learned something useful!


Can I chain pgrep with kill? (n.d.). Retrieved February 10, 2020, from

pkill(1) – Linux man page. (n.d.). Retrieved February 10, 2020, from