用 ps aux 快照全部进程并搜索

一条命令导出完整进程列表并按关键词过滤。

macOS进程监控终端低风险
运行 ps aux | grep -i "chrome" 即可列出所有包含该关键词(不区分大小写)的进程行。

01命令

命令
$ ps aux | grep -i "<name>"

02作用说明

ps aux 会为系统上的每个进程输出一行,包括用户、PID、CPU 占用、内存占用和完整命令,也包含没有终端的进程。把这份快照用管道交给 grep,就能筛出你正在找的进程;grep -i 表示不区分大小写,Chrome、chrome 都能匹配。

03风险

风险低风险
!注意: grep 命令本身也会出现在结果里;可以再加 | grep -v grep 把它去掉,或者改用 pgrep 获得更干净的纯 PID 列表。

04撤销

✓无需撤销——该命令不会改变持久状态。

05来源

  • PS(1) — macOS man page
    KEITH · technical · 2026-09-17
    依据: The BSD ps man page lists the -a, -u and -x options whose combination 'aux' shows every process on the system with CPU, memory and command columns.
  • ps — process status (macOS)
    SS64 · technical · 2026-09-17
    依据: The page documents the BSD flags that make up 'aux': -a (other users' processes), -u (user-oriented output with %CPU and %MEM), and -x (processes without a controlling terminal).

最后验证: 2026-09-19 · 分类: 系统与设置

06相关方案