pstree displays running processes as a tree hierarchy, showing parent-child relationships.
Basic Usage
# Show full process tree
pstree
# Show process tree with PIDs
pstree -p
# Show tree with command line arguments
pstree -a
# Show tree for a specific PID
pstree 1234
# Show tree with UID transitions
pstree -u
Common Flags
Flag
Description
-p
Show PIDs
-a
Show command line arguments
-n
Sort processes by PID
-s
Show parent processes
-u
Show UID transitions
-h
Highlight current process
-Z
Show SELinux contexts
-C type
Color output (auto, always, none)
Related Tools
ps — snapshot of current processes
top / htop — interactive process monitoring
pgrep / pkill — process search and signal
1---2name: quickstart-8343description: pstree Quickstart4---5# pstree Quickstart67pstree displays running processes as a tree hierarchy, showing parent-child relationships.89## Basic Usage1011```bash12# Show full process tree13pstree1415# Show process tree with PIDs16pstree -p1718# Show tree with command line arguments19pstree -a2021# Show tree for a specific PID22pstree 12342324# Show tree with UID transitions25pstree -u26```2728## Common Flags2930| Flag | Description |31|------|-------------|32| `-p` | Show PIDs |33| `-a` | Show command line arguments |34| `-n` | Sort processes by PID |35| `-s` | Show parent processes |36| `-u` | Show UID transitions |37| `-h` | Highlight current process |38| `-Z` | Show SELinux contexts |39| `-C type` | Color output (auto, always, none) |4041## Related Tools4243- `ps` — snapshot of current processes44- `top` / `htop` — interactive process monitoring45- `pgrep` / `pkill` — process search and signal
Run npx skillmds@latest add javimosch/quickstart-834 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
pstree Quickstart It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
javimosch (@javimosch) published this skill. Their other Agent Skills are listed on their SkillMD profile.