Kill Tomcat with a single command

This will kill all Tomcat processes running on the machine

ps -ef | grep tomcat | awk '{print $2}' | xargs kill -9

If the Tomcat process is running as root, adding sudo before the kill command may be required

ps -ef | grep tomcat | awk '{print $2}' | xargs sudo 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 )

Google photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s