check listening ports command prompt code example
Example 1: cmd listening ports
C:\> netstat -a -b
Example 2: how to check listening ports on a server
sudo ss -tulwn | grep LISTEN
C:\> netstat -a -b
sudo ss -tulwn | grep LISTEN