Jan
30
2017

Kill All Processes with Same Name in Linux

Mauro Cesar Fileto

These days I was doing some maintenance on a Linux Server (or Linux Box as it is also a know name for servers) and came to the need of killing all processes that had the same name.

In order to do it in a simple manner, a single command line has been written as follows.

Kill all processes matching the string “myProcessName”:

ps -ef | grep myProcessName | grep -v grep | awk '{print $2}' | xargs kill -9

About the Author: Mauro C. Fileto

Leave a comment

You must be logged into post a comment.

Translate »

Enjoy this blog? Please spread the word :)

RSS
Facebook
Google+
http://www.cesarfileto.com/blog/2017/01/30/kill-all-processes-with-same-name-in-linux/">
Twitter