What is the command to display a list of open ports on a Debian server?
netstat -a | egrep 'Proto|LISTEN' but I would like something more specific that actually lists the port number.
I'm a big fan on
netstat -ntlp and
lsof -i, both mentioned already.
A new(er) command to me is ss.
The invocation is like:
It's good to have options, in terms of commands and flags.
TechRepulic has a decent article that you can find here. It has some similar commands as you listed above but also a few variations. I would also highly recommend using nmap to do a port scan of the computer in question so you can see from an external perspective what ports are open and listening.