Visualize process parent-child relations quickly to find orphans, zombies and unexpected forks. 24.04.2026 | reading time: 2 min When a server behaves strangely the process list can hide relationships; `pstree` draws the family tree of processes so you see who spawned whom at a glance. Hands-on example Say you suspect a background job spawned multiple helpers; run `pstree -p` to include PIDs and inspect the branches; example command and output shown below. ```bash $ pstree -p systemd(1)─┬─sshd(1023)─┬─sshd(2048)───bash(2050)───python(3090) │ └─sshd(2051)───bash(2052)───my_worker(3101) └─nginx(1100)─┬─nginx(1101) └─nginx(1102) ``` Options that matter Use `-p` to show PIDs, `-a` to display command-line arguments, `-H PID` to highlight a specific PID, `-s` to show only a process's ancestors, `-n` to sort by PID and `-l` to prevent line wrapping; combine options to pinpoint orphans, spot zombies and verify which process holds a resource. Practical troubleshooting tips When a service leaks processes, start with `pstree -p` to locate the root, then add `-a` to see the exact invocation; if you must kill a subtree use the PID at its root, and re-run `pstree` to confirm the cleanup succeeded. Where this fits `pstree` is a diagnostic, visual tool that complements linear listings; use it during incident response, when tracing daemons, and while teaching newcomers how processes relate to one another. Wrap up and next steps Try `pstree` on a busy system, combine its output with `ps` or `strace` for deeper analysis, and practice until reading trees is second nature; to deepen skills consider certifications such as CompTIA Linux+ or LPIC-1 and intensive exam preparation at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. processes utilities troubleshooting