一.Windows端口查询及结束:
netstat-ano
根据端口找到对应的PID(资源管理器根据此PID找到运行中进程)
根据端口号“80”查找进程号
netstat-ano|findstr"80"
根据进程号“XXXX”查找进程名
tasklist|findstr
根据进程名杀死进程
taskkill/f/t/imXXXX.exe
二.Linux
1.查端口及进程对应的PID
ss-lntp|grep80
lsof-i:80|grep"(LISTEN)"
netstat-tlnp|grep80
netstat-pnl|grep80
2.