Reputation: 709
I'm working in application that monitor the open ports count in Ubuntu distro., my question is how to get the count of open ports for each processe by terminal commands ?
Upvotes: 0
Views: 349
Reputation: 3439
You can use netstat -anltp | grep "LISTEN"
to list all open ports.
Try this for the count: netstat -anltp | grep "LISTEN" | wc
Upvotes: 1