“在Windows下查看端口对应进程”的版本间的差异

来自YTYZX有图有真相的百科
跳转至: 导航搜索
第3行: 第3行:
 
[[File:KBWinR.png]]
 
[[File:KBWinR.png]]
  
  2. 在命令行输入<font colors=bule>netstat -ano</font>输出当前运行的所有端口。
+
  2. 在命令行输入<font color=bule>netstat -ano</font>输出当前运行的所有端口。
  
 
[[File:WindowsPortsPID1.png]]
 
[[File:WindowsPortsPID1.png]]
  
  3. 使用命令<font colors=bule>netstat -aon | findstr "3236" </font>查看被占用端口对应的 PID
+
  3. 使用命令<font color=bule>netstat -aon | findstr "3236" </font>查看被占用端口对应的 PID
 
      
 
      
 
[[File:WindowsPortsPID2.png]]
 
[[File:WindowsPortsPID2.png]]
  
  4. 使用命 令tasklist | findstr "3236"查看指定 PID 的进程,显示YodaoDict.exe占用了3236端口。
+
  4. 使用命 令<font color=bule>tasklist | findstr "3236"</font> 查看指定 PID 的进程,显示YodaoDict.exe占用了3236端口。
  
 
[[File:WindowsPortsPID3.png]]
 
[[File:WindowsPortsPID3.png]]
  
  5. 如需强制结束此进程,可使 用taskkill /T /F /PID 3236
+
  5. 如需强制结束此进程,可使 用<font color=bule>taskkill /T /F /PID 3236</font>。
  
 
[[File:WindowsPortsPID4.png]]
 
[[File:WindowsPortsPID4.png]]

2022年4月17日 (日) 19:46的版本

1. window+R 组合键,调出命令行窗口。

KBWinR.png

2. 在命令行输入netstat -ano输出当前运行的所有端口。

WindowsPortsPID1.png

3. 使用命令netstat -aon | findstr "3236" 查看被占用端口对应的 PID
   

WindowsPortsPID2.png

4. 使用命令tasklist | findstr "3236"查看指定 PID 的进程,显示YodaoDict.exe占用了3236端口。

WindowsPortsPID3.png

5. 如需强制结束此进程,可使用taskkill /T /F /PID 3236

WindowsPortsPID4.png