Linux: check which program and process id (pid) listening on a particular port
For example, I want to check which program listening to port 8083, I can use the below command:
Netstat command
[root@myservertmp]# netstat -taupen | grep 8083Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
tcp 0 0 0.0.0.0:8083 0.0.0.0:* LISTEN 500 54617 9894/java
[root@myserver tmp]# ls -l /proc/9894/exe
lrwxrwxrwx. 1 sas sas 0 Jan 28 21:11 /proc/9894/exe -> /opt/myprog/thirdparty/jdk/jdk1.6.0_30/bin/java
Comments