how to check open ports in ubuntu server code example
Example: ubuntu listening ports
# To see ports in use
sudo lsof -i -P -n | grep LISTEN
sudo netstat -tulpn | grep LISTEN
# To see ports in use
sudo lsof -i -P -n | grep LISTEN
sudo netstat -tulpn | grep LISTEN