Forrest logo
back to the pstree tool

pstree:tldr:01bee

pstree: Display a tree of processes with PIDs.
$ pstree -p
try on your machine

The command "pstree -p" is used in Unix-like operating systems (such as Linux) to display the current running processes in a tree-like structure, representing their hierarchical relationships. Here's a breakdown of each component:

  • "pstree": This is the name of the command being executed. It stands for Process Tree.
  • "-p": It is a flag or option for the pstree command, indicating that the process IDs (PIDs) of the processes should be displayed alongside their names.

When executed, the "pstree -p" command will generate an output that visually represents the processes running on your system as a tree. Each process is represented by a node, and the indentation of nodes shows their relationship with each other. The process IDs are displayed next to their names, making it easier to identify and trace processes.

This command can be useful for understanding the hierarchy and relationships between processes, especially when troubleshooting or analyzing system performance.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the pstree tool