ubuntu 查看端口

查看端口占用情况

sudo netstat -ap

后面还可加 grep 进行快速查找。

eg:

sudo netstat -ap|grep -e 8006 -e 8081 -e 8010

resault:

tcp6       0      0 localhost:8006          [::]:*                  LISTEN      6502/java       
tcp6       0      0 [::]:8010               [::]:*                  LISTEN      6502/java

可直接kill

kill 6502

猜你喜欢

转载自blog.csdn.net/qq_33717425/article/details/82256591
今日推荐