售前咨询

400-884-1138

0592-8069966

售后咨询

0592-5178211

0592-3200777

QQ:4008841138

企业QQ咨询

股票代码:832571

如何查看端口被占用?

发布时间:2018-03-14 16:10:55

Winodws编

开始>>>运行>>>cmd>>>netstat -ano | findstr ":"端口"

例如:查看80端口占用情况

netstat -ano | findstr ":"80"

最后一例1284等是指PID


如果要结束端口占用命令:tasklist | findstr "PID"

例如:

tasklist | findstr "1284"



Centos编

输入: lsof -i:端口

例如:

[root@localhost ~]# lsof -i:3306

如果要结束端口占用命令:kill "PID"

例如:

[root@localhost ~]# kill 8325

如查没有安装lsof命令,可运行:yum install lsof 安装

如有疑问请联系 技术支持