Monday, August 11, 2014

How to know what program is listening on a given port?


I face this issue alot where I need to know list of occupied ports and the pids, I keep forgetting the commands so I thought about posting them here for future references and for anyone who needs it :
 
I use this command to have a full detail :
sudo netstat -taupen

if I need to know exactly which one is listening on specific port (i.e. 8080) I use this :
 
sudo netstat -tapen | grep ":8080"


P.S: the above commands for ubuntu OS, I have not tried them on over distributions
 

1 comment:

DrCotton said...

Hello Ahmad, are you a crowdsource developer ? if yes can you precisely tell me what motivated you to become a crowdsource developer. I need you value able answer for my phd research.