macOS
brew install gnu-whichlocal Homebrew formula metadata
安装
brew install gnu-whichlocal Homebrew formula metadata
sudo apt install gnu-whichDebian stable package indexes · gnu-which · 来源: deb.debian.org
sudo apk add whichAlpine Linux edge package indexes · which · 来源: dl-cdn.alpinelinux.org
sudo dnf install whichFedora Rawhide package metadata · which · 来源: dl.fedoraproject.org
nix profile install nixpkgs#whichnixpkgs package indexes · pkgs/by-name/wh/which/package.nix · 来源: api.github.com
sudo pacman -S whichArch Linux sync databases · which · 来源: geo.mirror.pkgbuild.com
sudo zypper install whichopenSUSE Tumbleweed package metadata · which · 来源: download.opensuse.org
choco install whichChocolatey community package catalog · which · 来源: community.chocolatey.org
scoop install main/whichScoop official bucket manifest trees · bucket/which.json · 来源: api.github.com
winget install --id GnuWin32.Which -eWindows Package Manager source index · GnuWin32.Which · 来源: cdn.winget.microsoft.com
概览
GNU implementation of which utility
历史
GNU Which is the GNU implementation of the which utility, a small command that reports which executable a shell would find for a command name. Its domain is intentionally narrow: inspect command search paths and explain why a name resolves to one program rather than another.
The official Savannah project page is the package home, and the GNU FTP archive records public releases from which 2.16 and 2.17 in 2007 through later 2.x releases. After version 2.21 in 2015, GNU FTP shows renewed releases in the 2.22, 2.23, and 2.25 line during 2025 and 2026.
The utility is widely familiar because shells, Unix variants, and GNU systems all have command lookup workflows. GNU Which remains separately packaged for environments where users want GNU behavior, GNU licensing, or an external executable rather than a shell builtin or shell-specific type command.
Practitioners use which when debugging PATH order, checking whether a package installed the expected executable, documenting build prerequisites, or explaining why scripts pick one compiler, interpreter, or helper over another.
The significance is mostly operational: it is a tiny diagnostic tool for path hygiene. In package-manager culture, which helps confirm shims, keg-only tools, alternatives systems, and GNU-prefixed replacements without reading shell startup files by hand.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
which | 可执行文件 | 已索引可执行文件 | 从本地可执行文件索引发现。 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
安装元数据
| 软件包键 | brew:gnu-which |
|---|---|
| 版本 | 2.25 |
| 软件包管理器 | Homebrew |
| 主页 | https://savannah.gnu.org/projects/which/ |
| 最后更新 | 2026-05-23T14:07:00-04:00 |
| Pulse | updated |
| Bottle | 未记录 |
| 服务 | 未声明 |
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
gnu-which 2.21+dfsg-5
Utility to show the full path of commands
https://savannah.gnu.org/projects/which
sudo apt install gnu-whichgnu-which 2.21+dfsg-4build1
Utility to show the full path of commands
https://savannah.gnu.org/projects/which
sudo apt install gnu-whichwhich
nix profile install nixpkgs#whichwhich 2.25-r0
A utility to show the full path of commands
https://savannah.gnu.org/projects/which
sudo apk add whichwhich-doc 2.25-r0
A utility to show the full path of commands (documentation)
https://savannah.gnu.org/projects/which
sudo apk add which-docwhich 2.25-2.fc45
Displays where a particular program in your path is located
https://savannah.gnu.org/projects/which/
sudo dnf install whichwhich 2.25-1
A utility to show the full path of commands
https://savannah.gnu.org/projects/which/
sudo pacman -S whichwhich 2.25-1.3
Displays where a particular program in your path is located
https://savannah.gnu.org/projects/which/
sudo zypper install whichwhich
choco install whichmain/which
scoop install main/whichGnuWin32.Which
winget install --id GnuWin32.Which -eallankoechke.which
winget install --id allankoechke.which -e来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.