Kill a process running on a particular tcp port

Find out the list of tcp processes using the below command

 netstat -tulpun 

Then use the below command to kill the tcp process.

    sudo fuser -k PORT_NUMBER/tcp

Please replace the PORT_NUMBER with the actual port number of the running process.

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