Find list of open ports / listening ports

lsof

Samples

# lsof -i -n -P

netstat

Samples

# netstat -tulpn
# netstat -a | egrep 'Proto|LISTEN'
# netstat -ao

Important netstat arguments

-n, --numeric don't resolve names - this one really saves time ;)
-e, --extend display other/more information
-p, --programs display PID/Program name for sockets
-l, --listening display listening server sockets
-t, --tcp tcp
-u, --udp udp
-a, --all, --listening display all sockets (default: connected)
-c, --continuous continuous listing

 

You may also like...

Leave a Reply

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