0

I want to use netstat -anp to check which program/process is listening a specific port. But the output includes lots of lines in which the value of 'PID/Program Name' column is just a -. For example

Active Internet connections (servers and established) 
Proto Recv-Q Send-Q   Local Address           Foreign Address         State    PID/Program name 
tcp        0      0   0.0.0.0:902             0.0.0.0:*               LISTEN      - 
tcp        0      0   0.0.0.0:5801            0.0.0.0:*               LISTEN      - 
tcp        0      0   0.0.0.0:5802            0.0.0.0:*               LISTEN    3641/Xvnc
tcp        0      0   0.0.0.0:139             0.0.0.0:*               LISTEN      - 
tcp        0      0   0.0.0.0:5901            0.0.0.0:*               LISTEN      - 
tcp        0      0   0.0.0.0:5902            0.0.0.0:*               LISTEN    3641/Xvnc

I can see 5802 and 5902 is listened by Xvnc, but what for 902, 5801, 139 and 5901? Thanks.

1 Answer 1

4

It means that you do not have the appropriate privileges to determine the PID/program. Rerun netstat as the superuser, e.g. sudo netstat -anp.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .