pstree -p: Visualize the Process Parent/Child Tree
Display running processes as a tree with PIDs, so you can see exactly which process spawned which.
01Command
$ pstree -p02What it does
ps aux lists processes flatly, which makes it hard to tell who spawned whom; pstree draws the same information as an indented tree rooted at systemd. The -p flag appends each process's PID in parentheses, which is what makes the output actionable. Add -a to also show each process's full command-line arguments, useful when the program name alone is not enough.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Ubuntu Manpage: pstree - display a tree of processesEvidence: "pstree shows running processes as a tree. The tree is rooted at either pid or init if pid is omitted." -p: "Show PIDs."
- pstree - display a tree of processesEvidence: "pstree shows running processes as a tree"; the -p option is documented as "Show PIDs" (parenthesized process IDs next to each name).
Last verified: 2026-09-19 · Category: System & Settings
06Related solutions
Refresh the package index from all configured repositories, then install newer versions of every upgradable package.
Use free -h to see used, free, and available memory plus swap in GB/MiB instead of raw kilobytes.
Find every occurrence of a pattern across all files in a tree, printed as file:line:number matches.