Windows 端口占用 Port 端口占用 如何发现端口占用并且强杀?

应用场景

场景

有时候本地测试,经常发现端口占用。

如何找到端口占用,并且 kill 掉呢?

端口占用情况

  1. lsof -i:XXX查看

  2. sudo netstat -apn | grep XXX查看

  3. ps -aux | grep XXX详细信息

  4. ps -ef | grep XXX根据分类条件查询信息

发现并强杀

复制代码
>netstat -ano | findstr "8226"
  TCP    0.0.0.0:8226           0.0.0.0:0              LISTENING       17064

>tasklist|findstr "17064"
winrdlv3.exe                 17064 Services                   0     34,664 K

【使用管理员启动命令行】

复制代码
>taskkill /f /t /im "winrdlv3.exe"

3306 端口占用

复制代码
netstat -ano | findstr "3306"
相关推荐
x***r1511 小时前
Redis Desktop Manager 0.8.8 安装教程(Windows redis-desktop-manager-0.8.8.384详细步骤)
数据库·windows·redis
玖釉-4 小时前
Vulkan 离屏渲染详解:从 Framebuffer 到后处理、阴影贴图与 Render Texture
c++·windows·计算机视觉·图形渲染
峰上踏雪4 小时前
Windows 下最推荐的 Qt + VS2026 + CMake 开发方案
开发语言·windows·qt
s_nshine5 小时前
释放C盘,迁移studio相关数据到其他盘
android·windows·android studio·内存·c盘
衫水6 小时前
Windows Server Nginx 代理企业内网 API 偶发超时处理与保活 SOP(20260608))
运维·windows·nginx
X_szxj7 小时前
Windows安装liboqs库
windows·github
caimouse8 小时前
Reactos 第 5 章 进程与线程 — 5.1 概述
c语言·windows·架构
玖釉-8 小时前
nvpro_core2 详解:NVIDIA Vulkan / OpenGL 图形样例背后的现代 C++ 基础库
c++·windows·图形渲染
程序员佳佳8 小时前
我在 Windows 和低配 Linux 上做 RAG:Milvus、FAISS、向量 API 中转的中立实测
linux·人工智能·windows·gpt·aigc·milvus·faiss
佛山个人技术开发8 小时前
GitCode个人技术开发者总结完整使用指南
windows·git·svn·github·gitcode