查询在跑sh进程like a tree
ps -f -g<PID>
the reasult like the following :
PID TTY STAT TIME COMMAND
28460 pts/26 Ss 0:00 bash
29214 pts/26 R+ 0:00 \_ ps -f -g
3595 pts/25 Ss+ 0:00 bash
21542 pts/24 Ss+ 0:00 bash
15776 pts/23 Ss+ 0:00 bash
11269 pts/22 Ss+ 0:00 bash
11059 pts/21 Ss+ 0:00 bash
19306 pts/20 Ss+ 0:00 bash
19190 pts/19 Ss+ 0:00 bash
3609 pts/18 Ss+ 0:00 bash
3059 pts/2 Ss+ 0:00 bash
2185 pts/3 Ss+ 0:00 bash
1444 tty2 Ssl+ 0:00 /usr/lib/gdm3/gdm-x-session --run-script gnome-session --session=ubuntu
1446 tty2 Rl+ 214:16 \_ /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -bac
1450 tty2 S+ 0:00 \_ dbus-daemon --print-address 4 --session
1453 tty2 S+ 0:00 \_ /sbin/upstart --user