linux下查看端口被谁用了

[root@uu conf]# netstat -lntp |grep 80

tcp        0      0 :::8009                     :::*                        LISTEN      2065/java          
tcp        0      0 :::80                       :::*                        LISTEN      2065/java          
tcp        0      0 ::ffff:127.0.0.1:8005       :::*                        LISTEN      2065/java          
[root@uu conf]# ps -ef |grep 2065

root      1704  1585  0 15:34 pts/1    00:00:00 grep 2065
root      2065     1  0 Nov14 ?        00:00:34 /usr/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath /opt/tomcat/bin/bootstrap.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start

你可能感兴趣的:(linux)