1.占用查询端口的pid查询 C:\Users\helloworld>netstat -ano|findstr "9097" TCP 0.0.0.0:9097 0.0.0.0:0 LISTENING 6832 TCP [::]:9097 [::]:0 LISTENING 6832 2.关闭对应pid C:\Users\helloworld>taskkill -F -PID 6832 成功: 已终止 PID 为 6832 的进程。