how to see the ports in ubuntu code example
Example 1: see what is using a port ubuntu
$ sudo lsof -i:22
Example 2: check what ports are open linux
## if you use linux
sudo ss -tulw
$ sudo lsof -i:22
## if you use linux
sudo ss -tulw