1.查看某个端口的pid:netstat -ano | findstr 8002
结果为 :TCP 0.0.0.0:8002 LISTENING 2188
其中2188就是pid
2.查看某个pid的进程:tasklist | findstr 2188
javaw.exe 2188 Console
3.根据pid结束对应的进程:taskkill -PID | 2188 -F
成功:已终止pid为2188的进程。
1.查看某个端口的pid:netstat -ano | findstr 8002
结果为 :TCP 0.0.0.0:8002 LISTENING 2188
其中2188就是pid
2.查看某个pid的进程:tasklist | findstr 2188
javaw.exe 2188 Console
3.根据pid结束对应的进程:taskkill -PID | 2188 -F
成功:已终止pid为2188的进程。