🍺 BREW Explorer

← all formulae

gnu-which

brew install gnu-which v2.25 GPL-3.0-or-later

GNU implementation of the which command that locates executables in your PATH.

Why you might care

Drop-in replacement for the BSD which found on macOS; offers more features like listing all matches (not just the first) and better POSIX compliance. Useful if you need portable shell scripts or prefer GNU semantics.

Categories

Alternatives

which command type
4.9k
30-day installs · #606
13.8k
90-day · #680
21.7k
365-day · #1026

Links

Caveats

GNU "which" has been installed as "gwhich".
If you need to use it as "which", you can add a "gnubin" directory
to your PATH from your bashrc like:

    PATH="$HOMEBREW_PREFIX/opt/gnu-which/libexec/gnubin:$PATH"

Blurb generated by claude-haiku-4-5 on today.

Raw metadata
{
  "aliases": [],
  "alternatives": [
    "which",
    "command",
    "type"
  ],
  "build_dependencies": [],
  "categories": [
    "shell",
    "sysadmin"
  ],
  "caveats": "GNU \"which\" has been installed as \"gwhich\".\nIf you need to use it as \"which\", you can add a \"gnubin\" directory\nto your PATH from your bashrc like:\n\n    PATH=\"$HOMEBREW_PREFIX/opt/gnu-which/libexec/gnubin:$PATH\"\n",
  "conflicts_with": [],
  "dependencies": [],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "GNU implementation of which utility",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:38:13+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "gnu-which",
  "github_default_branch": null,
  "github_last_commit_at": null,
  "github_readme_excerpt": null,
  "github_repo": null,
  "github_stars": null,
  "github_topics": [],
  "homepage": "https://savannah.gnu.org/projects/which/",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": "GNU which - Summary [Savannah]",
  "installs_30d": 4941,
  "installs_365d": 21654,
  "installs_90d": 13792,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "GPL-3.0-or-later",
  "llm_generated_at": "2026-06-20T23:45:52+00:00",
  "llm_model": "claude-haiku-4-5",
  "name": "gnu-which",
  "oldnames": [],
  "one_liner": "GNU implementation of the which command that locates executables in your PATH.",
  "optional_dependencies": [],
  "rank_30d": 606,
  "rank_365d": 1026,
  "rank_90d": 680,
  "raw_hash": "b1888bc5c4b489f5",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/g/gnu-which.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [],
  "version_head": null,
  "version_stable": "2.25",
  "versioned_formulae": [],
  "why_use_this": "Drop-in replacement for the BSD which found on macOS; offers more features like listing all matches (not just the first) and better POSIX compliance. Useful if you need portable shell scripts or prefer GNU semantics."
}