Quickly visualise parent-child relationships of running processes with pstree. 16.11.2025 | reading time: 2 min Want to see who started what on a Linux system? Use `pstree` to inspect parent-child relationships of running processes and spot orphaned or grouped jobs in a single glance. Quick Demo Create a tiny demo, start two background sleeps and inspect the tree with PIDs and arguments by running these commands and then `pstree -ap` to view the result. ```sh $ sleep 300 & [1] 12345 $ sleep 400 & [2] 12346 $ pstree -ap systemd(1)-+-sshd(1111)-+-sshd(2222)-bash(3333)---sleep(12345) `-cron(4444) bash(3333)---sleep(12346) ``` Useful Flags Use `-p` to print PIDs next to names, `-a` to show command-line arguments, `-u` to show user names, `-c` to avoid compressing identical subtrees and `-l` to allow long lines; combine flags to reveal different details while troubleshooting process ancestry. When to Reach for pstree Run `pstree` when you want a compact visual of which daemon spawned which worker, to find orphaned or zombie lines in a service chain, or to verify how shells and job control created background tasks during a troubleshooting session. Other Commands Nearby Complement `pstree` with snapshot and interactive tools: use `ps` for selectable fields, `top` or `htop` for live resource views, and `pgrep` to find PIDs when you want to highlight a subtree or script checks. Wrap-up pstree gives a fast structural overview that often reveals the root of a process problem before deep diving; practise it, combine it with `ps` and `htop`, and consider formal study to sharpen your skills — pursue certifications like CompTIA Linux+ or LPIC-1 and try the intensive exam preparation at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. processes utilities troubleshooting