I should have put this handy long time ago. There is situation that we need to know if a special port on a server is listening, then we can see if need to open firewall, etc. So the command netstat is our friend.
Simple way to use netstat is:
>netstat –ano | more
It will show all the listening ports in numerical form, and the process ID that is listening.
Another way is use find:
>netstat –an | find “:3389”
TCP 0.0.0.0:1367 0.0.0.0:0 LISTENING
I will add some Linux command later.