三、查看进程树命令:pstree
pstree命令格式
pstree [-A|U] [-up]
-A:各进程间连接用ASCII字符连接
-U:该进程之间连接用utf8字符连接
-p:同时显示PID
-u:同时列出每个进程的所属账号名称
@Ubuntu:~$ pstree -Aup
init(1)-+-NetworkManager(1344)-+-dhclient(1707)
| |-dnsmasq(2560,nobody)
| |-dnsmasq(2645,nobody)
| |-{NetworkManager}(1374)
| `-{NetworkManager}(1708)
|-accounts-daemon(2184)---{accounts-daemon}(2185)
|-acpid(1417)
|-atd(1429,daemon)
|-avahi-daemon(1331,avahi)---avahi-daemon(1332)
|-bamfdaemon(2892,zhouyl)---{bamfdaemon}(2896)
|-bluetoothd(1319)
|-chrome(3218,zhouyl)-+-chrome(3313)
| |-chrome(3690)-+-{chrome}(3693)
| | |-{chrome}(3694)
| | `-{chrome}(3695)
| |-chrome(3718)-+-{chrome}(3719)
| | |-{chrome}(3720)
| | `-{chrome}(3721)