get all processes by port used ubuntu code example
Example 1: ubuntu check process on port
sudo lsof -i:22
Example 2: find process id of port ubuntu
$ sudo netstat -ltnp | grep -w ':80'
sudo lsof -i:22
$ sudo netstat -ltnp | grep -w ':80'