在windows命令行窗口下执行:运行--cmd
C:\>netstat -aon|findstr "8080"
TCP 127.0.0.1:80 0.0.0.0:0 LISTENING 2448
端口被进程号为2448的进程占用,继续执行下面命令:
C:\>tasklist|findstr "2448"
thread.exe 2016 Console 0 16,064 K
很清楚,thread占用了你的端口,Kill it
C:\>netstat -aon|findstr "8080"
TCP 127.0.0.1:80 0.0.0.0:0 LISTENING 2448
端口被进程号为2448的进程占用,继续执行下面命令:
C:\>tasklist|findstr "2448"
thread.exe 2016 Console 0 16,064 K
很清楚,thread占用了你的端口,Kill it
本文介绍如何在Windows命令行中检查特定端口(如8080)是否被占用及定位占用该端口的进程。通过使用netstat和tasklist命令结合findstr筛选,可以找出占用指定端口的进程ID及名称,并提供了释放端口的方法。
461

被折叠的 条评论
为什么被折叠?



