Difference between revisions of "Port to PID"

From Noah.org
Jump to navigationJump to search
(New page: Category:Engineering How do you find which process is listening on a given port? Use the `lsof` command. For example, I saw that some process was already using port 69 (normally TFTP)...)
 
Line 6: Line 6:
 
<pre>
 
<pre>
 
lsof -i :69
 
lsof -i :69
 +
</pre>
 +
 +
To look for http:
 +
<pre>
 +
lsof -i :80
 +
</pre>
 +
 +
You can also look for files opened by a given user or command:
 +
 +
<pre>
 +
lsof -u USER
 +
lsof -c COMMAND
 
</pre>
 
</pre>

Revision as of 15:22, 14 November 2007

How do you find which process is listening on a given port? Use the `lsof` command.

For example, I saw that some process was already using port 69 (normally TFTP).

lsof -i :69

To look for http:

lsof -i :80

You can also look for files opened by a given user or command:

lsof -u USER
lsof -c COMMAND