Linux PSTREE Command

the pstree command is used to display processes in tree format.

Syntax

$pstree [options] [pid or username]

Options

Sr.No

Options

Descriptions

01

-p

will tell pstree to show a PID in parenthesis after each process name. ps, in contrast to pstree, shows PIDs by default.

02

-n

The -n option instructs pstree to sort its output in the order of the PIDs instead of in the default alphabetic order

03

-h

option highlights (or shows in bold) the current process and all of its ancestors

Example


$pstree root				
						
Share Share on Facebook Share on Twitter Share on LinkedIn Pin on Pinterest Share on Stumbleupon Share on Tumblr Share on Reddit Share on Diggit