ps -u
shuai@ubuntu:~$ ps -u
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
shuai 16912 0.0 0.5 24316 5412 pts/0 Ss 11:29 0:00 bash
shuai 20095 0.0 0.3 39352 3420 pts/0 R+ 11:47 0:00 ps -u
shuai@ubuntu:~$ ps -u root
PID TTY TIME CMD
1 ? 00:00:12 systemd
2 ? 00:00:00 kthreadd
3 ? 00:00:00 ksoftirqd/0
5 ? 00:00:00 kworker/0:0H
7 ? 00:00:32 rcu_sched
8 ? 00:00:00 rcu_bh
9 ? 00:00:01 migration/0
10 ? 00:00:00 lru-add-drain
11 ? 00:00:00 watchdog/0
12 ? 00:00:00 cpuhp/0
13 ? 00:00:00 cpuhp/1
14 ? 00:00:00 watchdog/1
15 ? 00:00:01 migration/1
16 ? 00:00:00 ksoftirqd/1
18 ? 00:00:00 kworker/1:0H
19 ? 00:00:00 kdevtmpfs
20 ? 00:00:00 netns
21 ? 00:00:00 khungtaskd
22 ? 00:00:00 oom_reaper
23 ? 00:00:00 writeback
24 ? 00:00:00 kcompactd0
25 ? 00:00:00 ksmd
26 ? 00:00:02 khugepaged
27 ? 00:00:00 crypto
28 ? 00:00:00 kintegrityd
29 ? 00:00:00 bioset
30 ? 00:00:00 kblockd
31 ? 00:00:00 ata_sff
32 ? 00:00:00 md
33 ? 00:00:00 devfreq_wq
root 下的进程中有一个 PID = 1 的进程:init 进程
一切用户态进程都是它的后代进程。