Blog
首页
文档
收藏
关于
  • 在线转换时间戳 (opens new window)
  • 在线压缩图片 (opens new window)
  • Float-Double转二进制 (opens new window)
  • 文件转Hex字符串 (opens new window)

HiuZing

🍑
首页
文档
收藏
关于
  • 在线转换时间戳 (opens new window)
  • 在线压缩图片 (opens new window)
  • Float-Double转二进制 (opens new window)
  • 文件转Hex字符串 (opens new window)
  • Nginx

  • Docker

  • CICD

  • Server

  • Linux

  • Windows

    • 命令
    • 端口
      • CMD
        • 端口占用(含 PID)
        • PID 对应进程名
        • 杀进程
  • 运维
  • Windows
HiuZing
2026-04-01
目录

端口

# CMD

# 端口占用(含 PID)

命令

netstat -ano | findstr :8081
1

输出示例

(最后一列数字就是 PID)

TCP    [::]:8081              [::]:0                 LISTENING       45904
1

# PID 对应进程名

命令

# 基础命令
tasklist | findstr 45904
1
2

输出示例

node.exe                     45904 Console                    1     48,592 K
1

命令

# 进阶精准命令
tasklist /FI "PID eq 45904"
1
2

/FI:筛选器(Filter)

"PID eq 45904":只显示 PID 等于 45904 的进程

# 杀进程

# 按 PID 杀(推荐,精准)
taskkill /T /F /PID 45904

# 按进程名杀(适合批量杀 node 进程)
taskkill /F /IM node.exe
1
2
3
4
5

/T:结束进程树(连子进程一起杀,避免残留)

/F:强制结束(不询问)

上次更新: 2026/04/03, 05:03:25
命令

← 命令

最近更新
01
快速浏览
04-02
02
GitHub Actions
12-22
03
分享社区
12-16
更多文章>
Theme by Vdoing | Copyright © 2021-2026 WeiXiaojing | 友情链接
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式