check which process open and close port 8080 ubuntu code example Example: find process id of port ubuntu $ sudo netstat -ltnp | grep -w ':80'