Article · Wikipedia archive · Last revised Jun 12, 2026

Pstree

pstree is a Linux command that shows the running processes as a tree. It is used as a more visual alternative to the ps command. The root of the tree is either init or the process with the given pid. It can also be installed in other Unix systems.

Last revised
Jun 12, 2026
Read time
≈ 1 min
Length
207 w
Citations
5
Source
pstree output in FreeBSD source ↗

pstree is a Linux command that shows the running processes as a tree.123 It is used as a more visual alternative to the ps command. The root of the tree is either init or the process with the given pid. It can also be installed in other Unix systems.

In FreeBSD, a similar output is created using ps -d,4 in Linux ps axjf5 produces similar output.

Examples

pstree pid

user@host ~$ pstree 1066
rsyslogd─┬─{in:imjournal}
         └─{rs:main Q:Reg}

pstree username

user@host ~# pstree username
dbus-daemon───{dbus-daemon}

dbus-launch

bash───firefox─┬─6*[{Analysis Helper}]
               ├─{BgHangManager}
               ├─{Cache2 I/O}
               ├─{Compositor}
               ├─{GMPThread}
               ├─{Gecko_IOThread}
               ├─{Hang Monitor}
               ├─{ImageBridgeChil}
               ├─{ImageIO}
               ├─{JS Watchdog}
               ├─{Link Monitor}
               ├─{Socket Thread}
               ├─{SoftwareVsyncTh}
               ├─{StreamTrans #1}
               ├─{Timer}
               └─{gmain}
See also

See also

References

References

  1. "Pstree Command in Linux". linuxize.com. 2019-10-23. Retrieved 2024-12-27.
  2. James, Hayden (2023-12-11). "pstree command in Linux with examples". LinuxBlog.io. Retrieved 2024-12-27.
  3. "pstree Command in Linux with Examples". GeeksforGeeks. 2020-05-20. Retrieved 2024-12-27.
  4. "ps(1)". man.freebsd.org. Retrieved 2026-05-29.
  5. "Ps(1): Report snapshot of current processes - Linux man page".
External links