- How to retrieve ports in use in the system?
- netstat -plan
- -p : Show the PID and name of the program to which each socket belongs;
- -l : Show only listening sockets;
- -a : Show both listening and non-listening sockets;
- -n : Show numerical addresses instead of trying to determine symbolic host, port or user names.
- netstat -4 --tcp --udp --all