Blog·Tanky WooABOUTRSS

Kill process by process name or script name

18 Nov 2013

Kill all processes match the process name or script name:

ps aux | grep [search string] | awk '{print $2}' | xargs kill -9

or use pkill:

pkill -9 -f [search string]

From Linux: How to Kill all instances of a script/program by using a string search

-f, --full The pattern is normally only matched against the process name. When -f is set, the full command line is used.