在 Windows 上查找和结束占用特定端口占用程序,并杀死

在 Windows 上查找和结束占用特定端口(如 9003)的程序,你可以使用以下步骤:

步骤 1:找到占用端口的进程 ID (PID)

  1. 打开命令提示符(按 Win + R,输入 cmd,然后按回车)。

  2. 输入以下命令来查找占用 9003 端口的 PID:

    bash 复制代码
    netstat -ano | findstr :9003

    输出将显示类似如下的信息:

    复制代码
    TCP    0.0.0.0:9003      0.0.0.0:0       LISTENING      1234

    这里 1234 是进程 ID (PID)。

步骤 2:查找进程名称(可选)

可以使用 tasklist 命令查看该 PID 所对应的程序名称:

bash 复制代码
tasklist | findstr 1234

替换 1234 为第一步中获得的 PID。这将显示占用该端口的进程名称。

步骤 3:杀死进程

使用 taskkill 命令来结束这个进程:

bash 复制代码
taskkill /PID 1234 /F

同样替换 1234 为第一步中获得的 PID。

执行这些步骤后,占用 9003 端口的进程就会被结束。

相关推荐
木心术111 小时前
Windows系统下MySQL与AI工具集成方案:数据存储与调用实践
人工智能·windows·mysql
beyond阿亮11 小时前
Hermes Agent快速接入 QQ 完整教程|QQ聊天使用AI智能体
人工智能·windows·ai·openclaw·hermes agent
DONSEE广东东信智能读卡器12 小时前
用PowerShell实现Windows 本地 WSS/HTTPS 自签名证书配置方法
windows·网络协议·https·powershell·身份证阅读器
DogDaoDao15 小时前
Windows 下 Git 报错:`touch` 无法识别 —— 原因分析与 7 种解决方案(从入门到精通)
windows·git·程序员·npm·powershell·cmd·touch
Ai.den16 小时前
Windows 安装 MinerU 3.x 实现本地批量解析 PDF
人工智能·windows·ai
xfddlm16 小时前
在Windows上配置Claude Code
windows
AI行业学习16 小时前
Notepad++ 下载+安装+插件集合 完整教程(Windows,安全无捆绑)
windows·notepad++
__zRainy__17 小时前
uni-app 全局容器实战系列(二):Vite 虚拟模块
windows·uni-app
Omics Pro17 小时前
前沿学科:量子生物学!
大数据·数据库·人工智能·windows·redis·量子计算
IceSugarJJ18 小时前
Windows下VSCode+ WSL项目启动流程
linux·windows·vscode·ubuntu·wsl