How to Find a Process Using a Particular Port in Linux

(0 votes, average 0 out of 5)

If you are trying to find the process using a particular port in Linux, you can do the following:

 

lsof -i tcp:2700

 

The above example will return a list of processes using the TCP port with ID 2700.

Alternatively you can view all open network connections by doing the following:

 

sudo netstat -nlp

 

Partner Links:
Last Updated on Wednesday, 22 February 2012 12:37  
Related Articles

» Merge Two Versions of A Table Together in a Database

When keeping multiple versions of a website, or perhaps migrating a website to a new environment, it is often necessary to merge any changes between the two databases. The databases have the same structure, but each has new, unique content which needs to be added to the other. The following tutorial uses syntax for MySQL, however it should be applicable to other major database schemas. The following example assumes that the master database where we want all of the changes to reside is called...

» Introduction to LaTeX

LaTeX is a self-described document preparation system that is often used for research papers or other technical publications.  It is, in essence, an extremely useful computer language that interprets code and produces a well-formatted document.  It can greatly increase productivity due to the ease of formatting, and other nicities like automatic figure and reference numbering and easy mathematical representation.  Unfortunately, it also have a very steep learning curve. ...

» How to Exit in Python

Exiting in python is fairly straight-forward.  You need to import the "sys" library, and then call exit from it.123import sys sys.exit()Calling exit with no arguments is a clean exit -- no error code is returned.  If you'd like to exit with an error message, simply pass the message as a parameter and exit will automatically exit with an error and print your message.123import sys sys.exit("This is an example of an error message")