PID by port ubuntu 18 code example
Example 1: how to stop running port in ubuntu
sudo kill -9 `sudo lsof -t -i:{PORT_NUMBER}`
Example 2: find process id of port ubuntu
$ sudo netstat -ltnp | grep -w ':80'
sudo kill -9 `sudo lsof -t -i:{PORT_NUMBER}`
$ sudo netstat -ltnp | grep -w ':80'