1、netstat 语法
命令1:netstat -antp | grep :80(查看80端口被哪个服务占用)or netstat -antpuel | grep ":22" | grep -v grep(过虑grep本身)
命令2:netstat -antp | grep :(查看所有端口占用情况)
2、ps 语法
命令1:ps aux | grep nginx(查看nginx进程运行状态)or ps aux | grep :80 | grep -v grep(过虑grep本身)
杀掉进程命令:
a)相关nginx进行全部杀掉:killall -9 nginx
b)把PID两个进程杀掉:kill -9 pid1 and kill -9 pid1
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有