Linux – Kill process by command name

grepkilllinux

I would like to kill a java process based on the command name…
Whats the best way to do it?

(i.e. when you do ps -f the name in the CMD column).

Best Answer

Simples, use pkill

pgrep, pkill - look up or signal processes based on name and other attributes