commands.sh

pstree

linux

A convenient tool to show running processes as a tree.

More info →

Options (3)

-p, --show-pidsboolean

Display a tree of processes with PIDs

Example: pstree {{[-p|--show-pids]}}
-a, --argumentsboolean

Display command line arguments

Example: pstree {{[-a|--arguments]}}
-s, --show-parentsboolean

Display parents of a specified process

Example: pstree {{[-s|--show-parents]}} {{pid}}

Examples (6)

Display a tree of all processes (rooted at init)

Display a tree of processes with PIDs

pstree [-p|--show-pids]

Display all process trees rooted at processes owned by specified user

pstree user

Display command line arguments

pstree [-a|--arguments]

Display children of a specified process

pstree pid

Display parents of a specified process

pstree [-s|--show-parents] pid
made by @shridhargupta | data from tldr-pages