The Linux Newbie Guide  ⇒    Fundamentals     Advanced     Supplement   Command Index   ENG⇒中
All rights reserved, please indicate the source when citing
  

pstree - Display Process Hierarchy Tree



The pstree command displays a tree-like diagram illustrating the relationships between different processes.

The basic syntax of the pstree command is pstree [OPTIONS].

Some commonly used options for the pstree command include:

The output of pstree typically looks like an indented tree structure, where each process is shown along with its parent and child processes. This can be helpful in understanding the relationship between various processes and how they are organized within the system.

Example:
$ pstree
systemd─┬─ModemManager───2*[{ModemManager}]
         ├─NetworkManager───2*[{NetworkManager}]
         ├─2*[abrt-watch-log]
         ├─abrtd
         ├─accounts-daemon───2*[{accounts-daemon}]
         ├─alsactl
         ├─at-spi-bus-laun─┬─dbus-daemon───{dbus-daemon}
         │ └─3*[{at-spi-bus-laun}]
         ├─at-spi2-registr───2*[{at-spi2-registr}]
         ├─atd
         ├─auditd─┬─audispd─┬─sedispatch
         │         │          └─{audispd}
         │         └─{auditd}
. . .

|For more pstree examples, explanations, and options, you can refer to the provided link.