Site icon Voina Blog (a tech warrior's blog)

Bash one-liner: kill all processes with the same name

Advertisements

A simple one liner to kill all the processes having the same name or token in the name (myprocess):


kill -9 $(ps aux | grep myprocess | awk ‘{print $2}’)

This is a very effective way of cleaning up stuck processes that were spawned by some gone wrong software.

Exit mobile version