pstree
processLinux/Unix
The pstree command is one of the most frequently used commands in Linux/Unix-like operating systems. pstree Display a tree of processes
Quick Reference
Command Name:
pstree
Category:
process
Platform:
Linux/Unix
Basic Usage:
pstree [options] [arguments]
Common Use Cases
Syntax
pstree [options] [pid|user]
Options
| Option | Description |
|---|---|
-a |
Show command line arguments |
-A |
Use ASCII line drawing characters |
-c |
Disable compaction of identical subtrees |
-G |
Use VT100 line drawing characters |
-h |
Highlight current process and its ancestors |
-H pid |
Highlight the process with the specified PID |
-l |
Display long lines (don't truncate) |
-n |
Sort by PID instead of by name |
-p |
Show PIDs in the tree |
-s |
Show parents of the selected process only |
-S |
Show namespaces transitions |
-T |
Hide threads |
-u |
Show uid transitions |
-U |
Use UTF-8 line drawing characters |
-V |
Display version information |
-Z |
Show SELinux security contexts |
Examples
How to Use These Examples
The examples below show common ways to use the pstree command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.