本文最后更新于:3 years ago

关闭指定端口的进程

1.查找对应的端口占用的进程,找到占用端口对应的程序的PID号:

netstat  -aon|findstr  "9001" (windows)
yum install net-tools 安装工具
netstat -tunlp|grep 8090 查找指定端口pid (centos7)
netstat -ant 查找全部端口使用情况 (centos7)Copy

2.根据PID号找到对应的程序 ,找到对应的程序名:

tasklist|findstr "6676"Copy

3.结束该进程

taskkill /f /t /im java.exe
kill -9 pidCopy

本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!

Linux部署flask项目 Previous
Anaconda使用 Next