Linux Command to Immediately Kill Any Process Matching a Specific Name

Wrote up a quick command to send “kill -9” to any processes matching a specific word. This is useful in cases where “pkill -f” doesn’t quite immediately kill a process that I want dead.

ps -ea | grep java | awk {'print $1'} | xargs kill -9

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s