# 使用 Homebrew, apk, MacPorts, Nix 安装 pstree

查看 pstree 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:pstree
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install pstree
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install pstree
```

  证据: MacPorts ports tree: sysutils/pstree/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add pstree
```

  证据: Alpine Linux edge package indexes: pstree from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#pstree
```

  证据: nixpkgs package indexes: pkgs/by-name/ps/pstree/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:pstree
- **软件包管理器:** Homebrew
- **版本:** 2.40
- **来源摘要:** Show ps output as a tree
- **主页:** <https://github.com/FredHucht/pstree>
- **仓库:** <https://github.com/FredHucht/pstree>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- pstree (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2.40

## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- Nix - pstree: normalized package name match | nixpkgs package indexes: pkgs/by-name/ps/pstree/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - pstree - 2.40-r2: normalized package name match | Alpine Linux edge package indexes: pstree from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A small tool to list processes as a tree | https://github.com/FredHucht/pstree
- apk - pstree-doc - 2.40-r2: normalized package name match | Alpine Linux edge package indexes: pstree-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A small tool to list processes as a tree (documentation) | https://github.com/FredHucht/pstree
- MacPorts - pstree: normalized package name match | MacPorts ports tree: sysutils/pstree/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/pstree.yml](https://github.com/mxcl/pkgdb/blob/main/combined/pstree.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
