windows 查看端口或者应用程序名称

1、DOS下查看端口使用情况
   netstat -aon|findstr "端口"

2、按照进程ID查找程序名称
    tasklist|findstr "进程ID"

eg:
C:\>netstat -aon|findstr "9050"
TCP    127.0.0.1:9050         0.0.0.0:0              LISTENING       2016
看到了吗,端口被进程号为2016的进程占用,继续执行下面命令:
C:\>tasklist|findstr "2016"
tor.exe                     2016 Console                 0     16,064 K
很清楚吧,tor占用了你的端口。

猜你喜欢

转载自zuoyhui.iteye.com/blog/1830271