netstat find listening ports of user 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