Find what port is being used on a Linux server


I was configuring a Tomcat server tonight, what a pain in the arse that is is 🙂 any way after a restart of tomcat it the log indicated the port was still in use, to find the process using it required the following

 

 lsof -Pnl +M -i4

This will show all the open port using Ip4 you then just kill the process with

 

kill -9 XXXXXX

Advertisements


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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s