Dos:查看端口占用

来自WHY42

首先查看端口占用进程,然后根据进程号找到对应的进程即可:

netstat -ano | findstr "8080"
tasklist | findstr "xxxx"
C:\Users\solee>netstat -ano | findstr "8080"
  TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       5308
  TCP    127.0.0.1:8080         127.0.0.1:56108        TIME_WAIT       0
  TCP    127.0.0.1:8080         127.0.0.1:56109        TIME_WAIT       0
  TCP    127.0.0.1:8080         127.0.0.1:56111        TIME_WAIT       0
  TCP    127.0.0.1:56105        127.0.0.1:8080         TIME_WAIT       0
  TCP    127.0.0.1:56106        127.0.0.1:8080         TIME_WAIT       0

C:\Users\solee>tasklist | findstr "5308"
QQ.exe                        5308 Console                    4    182,200 K