linux中根据端口号来关闭进程的shell命令
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash

·
kill -9 $(netstat -nlp | grep :8080 | awk '{print $7}' | awk -F"/" '{ print $1 }')
其中
netstat -nlp | grep :8080 | awk '{print $7}' | awk -F"/" '{ print $1 }
表示查询出占用端口号8080的进程ID,
kill -9
表示删除该命令。
亲测可用,测试环境为centos6.5的32位机器




A beautiful web dashboard for Linux
最近提交(Master分支:19 天前 )
186a802e
added ecosystem file for PM2 5 年前
5def40a3
Add host customization support for the NodeJS version 5 年前
更多推荐
所有评论(0)