# Any of the following
sudo lsof -i -P -n | grep LISTEN
sudo netstat -tulpn | grep LISTEN
sudo lsof -i:22 # see a specific port such as 22
sudo nmap -sTU -O IP-address-Here
sudo lsof -i -P -n | grep LISTEN
sudo netstat -tulpn | grep LISTEN
sudo lsof -i:22 # see a specific port such as 22
sudo nmap -sTU -O IP-address-Here
# it list the all running ports with process id.
$ netstat -ltnp
netstat -tulpn
sudo netstat -tulpn | grep LISTEN
sudo lsof -i:22 # see a specific port such as 22
sudo netstat -tulpn
open ports LNX