how to see what is running on all ports code example
Example 1: netstat check port
sudo netstat -plnt
Example 2: how to check listening ports on a server
sudo ss -tulwn | grep LISTEN
sudo netstat -plnt
sudo ss -tulwn | grep LISTEN