Linux Security: List Listening Ports

There are a few ways to list all ports open and to show which daemons are listening. Simply run one of the two commands:

# lsof -i | grep "(LISTEN)"

Example output



# netstat -tupan | grep "LISTEN"

I believe this to be a cleaner output

Leave a Reply

Your email address will not be published / Required fields are marked *

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