pkg.soopen package index

brew / rank 1588

Install pstree with Homebrew, apk, MacPorts, Nix

Show ps output as a tree. Version 2.40 via Homebrew; verified 2026-09-18. Also installable with nix: nix profile install nixpkgs#pstree.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install pstree

local Homebrew formula metadata

MacPortsverified · 94%
sudo port install pstree

MacPorts ports tree · sysutils/pstree/Portfile · source: api.github.com

Linux

Alpine Linux apkverified · 92%
sudo apk add pstree

Alpine Linux edge package indexes · pstree · source: dl-cdn.alpinelinux.org

Nixverified · 92%
nix profile install nixpkgs#pstree

nixpkgs package indexes · pkgs/by-name/ps/pstree/package.nix · source: api.github.com

overview

Package summary

Show ps output as a tree

Commands and aliases

  • pstree

history

Project history and usage

Fred Hucht's pstree is a portable Unix command that renders the process hierarchy as a tree and supports filtering by user, process ID, command text, and depth.

Project history

Fred Hucht's pstree began as a shell script in the early 1990s. The first C version dates to 1992, and the source was managed in RCS from 1994. It was formerly distributed from the University of Duisburg-Essen through FTP and a project webpage; in 2022 the project moved to GitHub.

Adoption history

The implementation was designed for portability across Unix systems. Its official README lists AIX, Linux, HP-UX, A/UX, SunOS, Solaris, BSD variants, and macOS among tested systems. The supplied metadata records current packaging in Homebrew, Alpine Linux, MacPorts, and Nix.

How it is used

pstree normally obtains process information from ps and displays parent-child relationships from PID 1 or selected process IDs. On Linux it can read /proc directly. Options filter branches by user, PID, or command text, limit depth, choose line-drawing characters, and request wide output.

Why package nerds care

This pstree is a compact example of a durable Unix utility migrating through successive distribution eras: shell script, portable C program, RCS-managed source, FTP and university-hosted releases, package-manager distribution, and finally GitHub. It remains useful because parent-child process relationships are often easier to diagnose as a tree than as a flat ps listing.

Timeline

  • Early 1990s: pstree began as a shell script.
  • 1992: First C version.
  • 1994: Source management moved to RCS.
  • 2022: Project moved from its former university distribution sites to GitHub.

Related projects

  • ps supplies process data on most supported Unix systems.
  • Linux /proc is read directly by the Linux implementation path.
  • The similarly named pstree shipped by psmisc is a distinct implementation and should not be conflated with Fred Hucht's project.

Sources

  • Official manual page: https://github.com/FredHucht/pstree/blob/main/pstree.1
  • Official project README: https://github.com/FredHucht/pstree#readme

security posture

Risk level: green

narrow executable package without higher-risk signals.

Risk classifier

green risk · low confidence · appliance

Why

  • narrow executable package without higher-risk signals

Signals

  • metadata:no-higher-risk-signals

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 12 platform targets.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

executables

Installed executables

CommandKindExposureNote
pstreecliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-09-19
manager version2.40
manager updated2026-09-18
local dataok
upstreamcurrent
latest detectedv2.40

https://github.com/FredHucht/pstree

  • okNo freshness warnings were generated.

install metadata

Package metadata

Package keybrew:pstree
Version2.40
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/pstree
Homepagehttps://github.com/FredHucht/pstree
Repositoryhttps://github.com/FredHucht/pstree
LicenseGPL-3.0-only
Source archivehttps://github.com/FredHucht/pstree/archive/refs/tags/v2.40.tar.gz
Last updated2026-09-18T09:17:53+02:00
Pulseupdated
Bottleavailable (on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, monterey, sonoma, ventura, x86_64_linux)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namepstree
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Nix95%

pstree

nix profile install nixpkgs#pstree
  • normalized package name match
  • Matched by: Pstree
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/ps/pstree/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
apk95%

pstree 2.40-r2

A small tool to list processes as a tree

https://github.com/FredHucht/pstree

sudo apk add pstree
  • License: GPL-3.0-or-later
  • Architecture: x86_64
  • Source Package: pstree
  • 1 dependencies
  • 1 provides
  • normalized package name match
  • Matched by: Pstree
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: pstree from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk95%

pstree-doc 2.40-r2

A small tool to list processes as a tree (documentation)

https://github.com/FredHucht/pstree

sudo apk add pstree-doc
  • License: GPL-3.0-or-later
  • Architecture: x86_64
  • Source Package: pstree
  • normalized package name match
  • Matched by: Pstree
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: pstree-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
MacPorts95%

pstree

sudo port install pstree
  • normalized package name match
  • Matched by: Pstree
MacPorts ports tree · api.github.com · MacPorts ports tree: sysutils/pstree/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Geiger risk classifier
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment
  • pkg.so package database
  • pkgdb category and tag curation