Kill all processes with specified name

From vpsget wiki
Jump to: navigation, search

If you need to kill all processes with specified process name/pattern you can use the pkill command. First of all you can get the process list for specified pattern:

ps aux | grep <pattern>

For example to get all exim processes:

ps aux | grep exim

You will see the list of processes. No you can kill all of them using next command:

pkill -9 -f <pattern>

For example kill all exim processes:

pkill -9 -f exim

""