---
title: "Windows按照端口关闭"
author: "jilin"
date: "2017-05-02T16:24:27Z"
tags: []
categories: ["操作系统"]
slug: "windows"
draft: false
lastmod: "2017-05-07T20:41:27Z"
id: 2372289
url: "https://jilin.iteye.com/blog/2372289"
---

1、查找2181端口的PID  
netstat -ano|find "2181"

TCP    0.0.0.0:2181           0.0.0.0:0              LISTENING       14088  
TCP    \[::]:2181              \[::]:0                 LISTENING       14088

最后一位就是PID  
2、tasklist|find PID号，查看进程所属信息

C:\\Users\\EverSpring&gt;tasklist|find "14088"  
java.exe                     14088 Console                   20     62,656 K

 

3、taskkill /pid PID号 /t /f