一.用lsof命令(如果没有,请用yum install安装)
# lsof -i :8080 |grep "(LISTEN)"
java 25768 root 108u IPv6 1374286 0t0 TCP *:webcache (LISTEN)
二.用netstat命令:
[root@alpha-task-17-61 ~]# netstat -lnp|awk 'BEGIN{prt=":8080$"}{if ($4 ~ prt) print $0}'
tcp 0 0 :::8080 :::* LISTEN 25768/java
三.用ss命令:
[root@alpha-task-17-61 ~]# ss -lnp|grep 8080
LISTEN 0 50 :::8080 :::* users:(("java",25768,108))
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/15498/viewspace-2150962/
,如需转载,请注明出处,否则将追究法律责任。