“在Windows下查看端口对应进程”的版本间的差异
来自YTYZX有图有真相的百科
第3行: | 第3行: | ||
[[File:KBWinR.png]] | [[File:KBWinR.png]] | ||
− | 2. 在命令行输入<font color= | + | 2. 在命令行输入<font color=blue>netstat -ano</font>输出当前运行的所有端口。 |
[[File:WindowsPortsPID1.png]] | [[File:WindowsPortsPID1.png]] | ||
− | 3. 使用命令<font color= | + | 3. 使用命令<font color=blue>netstat -aon | findstr "3236" </font>查看被占用端口对应的 PID |
[[File:WindowsPortsPID2.png]] | [[File:WindowsPortsPID2.png]] | ||
− | 4. 使用命令<font color= | + | 4. 使用命令<font color=blue>tasklist | findstr "3236"</font>查看指定 PID 的进程,显示YodaoDict.exe占用了3236端口。 |
[[File:WindowsPortsPID3.png]] | [[File:WindowsPortsPID3.png]] | ||
− | 5. 如需强制结束此进程,可使用<font color= | + | 5. 如需强制结束此进程,可使用<font color=blue>taskkill /T /F /PID 3236</font>。 |
[[File:WindowsPortsPID4.png]] | [[File:WindowsPortsPID4.png]] |
2022年4月17日 (日) 19:47的最新版本
1. window+R 组合键,调出命令行窗口。
2. 在命令行输入netstat -ano输出当前运行的所有端口。
3. 使用命令netstat -aon | findstr "3236" 查看被占用端口对应的 PID
4. 使用命令tasklist | findstr "3236"查看指定 PID 的进程,显示YodaoDict.exe占用了3236端口。
5. 如需强制结束此进程,可使用taskkill /T /F /PID 3236。