ubuntu查看某個端口是否被占用
例如:
沒有啟動jar包,查看8080端口,沒有被占用
[ubuntu@ZY ~]#
[ubuntu@ZY ~]# netstat -tunlp |grep 8080
[ubuntu@ZY ~]#
啟動jar包后:
[ubuntu@ZY ~]#
[ubuntu@ZY ~]# netstat -tunlp |grep 8080
tcp6 0 0 :::8080 :::* LISTEN 2822/java
[ubuntu@ZY ~]#
[ubuntu@ZY ~]#
[ubuntu@ZY ~]#
[ubuntu@ZY ~]#
#####################