Find Which Process is Listening upon a Port on Linux

Posted on November 8, 2016 at 12:49 pm

Login via SSH as root and then type:

netstat -tulpn

Example output:

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      438/sshd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      703/exim4
tcp        0      0 0.0.0.0:43331           0.0.0.0:*               LISTEN      422/rpc.statd
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      411/rpcbind
tcp6       0      0 :::22                   :::*                    LISTEN      438/sshd
tcp6       0      0 ::1:25                  :::*                    LISTEN      703/exim4
tcp6       0      0 :::33565                :::*                    LISTEN      422/rpc.statd
tcp6       0      0 :::111                  :::*                    LISTEN      411/rpcbind
udp        0      0 0.0.0.0:46928           0.0.0.0:*                           422/rpc.statd
udp        0      0 0.0.0.0:1010            0.0.0.0:*                           411/rpcbind
udp        0      0 127.0.0.1:1022          0.0.0.0:*                           422/rpc.statd
udp        0      0 0.0.0.0:111             0.0.0.0:*                           411/rpcbind
udp6       0      0 :::40796                :::*                                422/rpc.statd
udp6       0      0 :::1010                 :::*                                411/rpcbind
udp6       0      0 :::111                  :::*                                411/rpcbind

Stay Updated

Other Posts

Updated Posts