ps -ef和ps aux
ps -ef
- unix风格
-e 列出所有进程
-f 完整格式
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 8月27 ? 00:25:08 /usr/lib/systemd/systemd --switched-root --system --deserialize 22
root 2 0 0 8月27 ? 00:00:00 [kthreadd]
root 3 2 0 8月27 ? 00:02:10 [ksoftirqd/0]
root 5 2 0 8月27 ? 00:00:00 [kworker/0:0H]
ps aux
- bsd风格,BSD是Unix的一个分支
-a 所有关联到终端的进程
-x 所有进程
-u 列出进程的用户
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 51756 2964 ? Ss 8月27 25:08 /usr/lib/systemd/systemd --switched-root --system --deserialize 22
root 2 0.0 0.0 0 0 ? S 8月27 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? S 8月27 2:10 [ksoftirqd/0]
root 5 0.0 0.0 0 0 ? S< 8月27 0:00 [kworker/0:0H]
区别
ps aux 可以不带-
ps -ef 必须带-
本文详细对比了Unix风格的ps-ef命令与BSD风格的psaux命令,解析了两者在显示进程信息上的不同之处。ps-ef通过-e和-f选项列出所有进程及其详细信息,而psaux则结合-a、-x和-u选项展示所有关联到终端的进程及用户信息。
1448

被折叠的 条评论
为什么被折叠?



