Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find port number for a particular process id in unix? [closed]

In UNIX OS, how can I find the port number when i know the process name or pid ?

like image 592
user1857216 Avatar asked Nov 27 '12 16:11

user1857216


People also ask

Is process ID a port number?

To answer the question directly: there is no connection between the process ID and the port number. They enumerate entirely different things. The PID identifies a process (eg a Firefox session: each tab may run as a different process), and the port number identifies which port that process is using to communicate.


1 Answers

netstat -pl | grep NAME_OR_PID
like image 170
Chris Eberle Avatar answered Sep 21 '22 05:09

Chris Eberle