怎么查看一个指定端口被哪个程序使用
如何查看一个指定端口被哪个程序使用
输出:TCP 127.0.0.1:80 0.0.0.0:0 LISTENING 2448
输出:thread.exe 2016 Console 0 16,064 K
其实,查看的方法有很多种,多数是借助于第三方工具实现的小工具,本质上是一样的。
windows 下命令行方法:
比如要查看8080端口被哪个程序占用了,windows命令行窗口下执行:运行--cmd
netstat -aon|findstr "8080"
输出:TCP 127.0.0.1:80 0.0.0.0:0 LISTENING 2448
端口被进程号为2448的进程占用,继续执行下面命令:
tasklist|findstr "2448"
输出:thread.exe 2016 Console 0 16,064 K
表示thread.exe程序占用了端口8080
linux 下命令行方法:
netstat -nlptu |awk '{print $4,$7}' | grep 80
转载请注明来自Master.R(石硕)的****博客:blog.****.net/shishuo365 如有疑问请发邮件shishuo365#126.com(将#更换为@)