# 使用 npm 安装 which

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

## 安装

```sh
sudo av install npm:which
```

其他安装命令:

### 便携式和语言管理器

- npm (100%):

```sh
npm install -g which
```

  证据: local npm package metadata

## 软件包事实

- **软件包键:** npm:which
- **软件包管理器:** npm
- **软件包管理器页面:** <https://www.npmjs.com/package/which>
- **版本:** 7.0.0
- **来源摘要:** Like which(1) unix command. Find the first instance of an executable in the PATH.
- **主页:** <https://github.com/npm/node-which#readme>
- **仓库:** <https://github.com/npm/node-which>
- **上游文档:** <https://github.com/npm/node-which#readme>
- **许可证:** ISC
- **源码归档:** <https://registry.npmjs.org/which/-/which-7.0.0.tgz>
- **问题跟踪器:** <https://github.com/npm/node-which/issues>
- **发布时间:** 2026-05-08T18:30:58.733Z
- **最后更新:** 2026-05-08T18:30:58.733Z
- **已生成:** 2026-07-08T07:18:31+00:00

## 可执行文件

- node-which (cli)
- node-which (别名)

## 依赖

- isexe

## 构建依赖

- @npmcli/eslint-config
- @npmcli/template-oss
- tap

## 安装行为

- post-install 钩子: 未定义
- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 7.0.0
- 管理器更新时间: 2026-05-08
- 本地数据: OK
- 上游仓库: https://github.com/npm/node-which
- 信息: No cached GitHub release or tag data was available.

## 安全说明

没有找到 which 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。


## 源数据库详情

- **Source Database:** npm registry
- **Dist Tags:** Latest: 7.0.0
- **Version Count:** 37
- **Maintainers:** saquibkhan, npm-cli-ops, reggi, owlstronaut
- **Author:** GitHub Inc.
- **Publisher:** GitHub Actions
- **Engines:** Node: ^22.22.2 || ^24.15.0 || >=26.0.0
- **Integrity:** sha512-RancgH2dmbLdHl6LRhEqvklWMgl/Hdnun0Y90KhBOLkMefg8Qa7/Zel8Sm+8HEcP6DEjzsWzpkuBQEZok58isA==
- **Shasum:** cdfdd7bfc31c5af050b97bc7c02b1844731fb8b2
- **Unpacked Size:** 7,487
- **File Count:** 0
- **Created At:** 2011-08-07T18:36:12.410Z
- **Latest Published At:** 2026-05-08T18:30:58.733Z
- **Modified At:** 2026-05-08T18:30:59.133Z

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

- Nix - which: normalized package name match | nixpkgs package indexes: pkgs/by-name/wh/which/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - which - 2.23-r0: normalized package name match | Alpine Linux edge package indexes: which from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A utility to show the full path of commands | https://savannah.gnu.org/projects/which
- apk - which-doc - 2.23-r0: normalized package name match | Alpine Linux edge package indexes: which-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A utility to show the full path of commands (documentation) | https://savannah.gnu.org/projects/which
- dnf - which - 2.25-1.fc45: normalized package name match | Fedora Rawhide package metadata: which from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Displays where a particular program in your path is located | https://savannah.gnu.org/projects/which/
- pacman - which - 2.25-1: normalized package name match | Arch Linux sync databases: which from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz | A utility to show the full path of commands | https://savannah.gnu.org/projects/which/
- zypper - which - 2.25-1.1: normalized package name match | openSUSE Tumbleweed package metadata: which from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Displays where a particular program in your path is located | https://savannah.gnu.org/projects/which/
- Chocolatey - which: normalized package name match | Chocolatey community package catalog: which from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','webex-meetings'
- Scoop - main/which: normalized package name match | Scoop official bucket manifest trees: bucket/which.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - GnuWin32.Which: normalized package name match | Windows Package Manager source index: GnuWin32.Which from https://cdn.winget.microsoft.com/cache/source.msix
- Debian apt - node-which - 2.0.2+~cs1.3.2-3: installed executable or alias match | Debian stable package indexes: node-which from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Cross-platform 'which' module for Node.js | https://github.com/isaacs/node-which
- Ubuntu apt - node-which - 2.0.2+~cs1.3.2-3: installed executable or alias match | Ubuntu 24.04 LTS package indexes: node-which from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Cross-platform 'which' module for Node.js | https://github.com/isaacs/node-which


## 相关链接

- [Language runtime packages](https://www.automicvault.com/zh-hans/pkg/language-runtime-packages/) - Matched curated package taxonomy and local package facts.
- [elm-review](https://www.automicvault.com/zh-hans/pkg/npm/elm-review/) - Both packages touch the same language runtime or ecosystem. Shared terms: find, node, path, which.
- [npm-run](https://www.automicvault.com/zh-hans/pkg/npm/npm-run/) - Both packages touch the same language runtime or ecosystem. Shared terms: executable, node, path, which.
- [npm-which](https://www.automicvault.com/zh-hans/pkg/npm/npm-which/) - Both packages touch the same language runtime or ecosystem. Shared terms: executable, node, path, which.

## 来源

- Nucleus package database
- package-page enrichment
- package version freshness
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
