How to show listening connections on a Linux box

A sequence of netstat’s parameters  I did not know gives you a clear and comprehensible list of connections listening on a Linux box …. can be useful, for example, to see if we have open services that are not required.

The full command is

netstat -plunt

root@aaabbbccc:# netstat -plunt
Active Internet connections (only servers)
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      2135/sshd       
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      2547/sendmail: MTA:
tcp        0      0 127.0.0.1:587           0.0.0.0:*               LISTEN      2547/sendmail: MTA:
tcp6       0      0 :::80                   :::*                    LISTEN      2473/apache2    
tcp6       0      0 :::22                   :::*                    LISTEN      2135/sshd       


Leave a Comment

Filed under Linux

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.