see what programs are using a port linux code example
Example 1: find out which procses is using port linux
sudo lsof -i:<port_number>
Example 2: linux see used ports
netstat -tulpn
sudo lsof -i:<port_number>
netstat -tulpn