Wingetlywingetly
AppsPacksLeaderboardDocs
PackGitHubSponsorPckgr↗
Wingetlywingetly

Browse, bundle, install. Every winget app in one place.

An independent index for the Windows Package Manager ecosystem.

Catalog

  • All apps
  • Packs
  • Docs

Project

  • Privacy
  • About
Sponsor

Wingetly is sponsored by Pckgr - automated application patching for Microsoft Intune.

Learn more ↗
© 2026 WingetlyData from microsoft/winget-pkgs
Wingetlywingetly
AppsPacksLeaderboardDocs
PackGitHubSponsorPckgr↗
← All apps
W

Which for Windows

by GnuWin32·v2.20
GnuWin32.Which

Last updated Apr 28, 2026

Which: show the full path of (shell) commands

Visit homepage↗

Install with winget

$ winget install --id GnuWin32.Which --exact --version 2.20

Run in Command Prompt, PowerShell, or Windows Terminal. Prompts for any agreements.

Sponsored

For Intune admins

Stop chasing app updates. Pckgr patches them for you.

Automated application patching for Microsoft Intune. Pckgr keeps a curated library of 1,000+ apps continuously up-to-date in your tenant via Microsoft Graph — no manual repackaging, no chasing vendor sites.

See Pckgr's app library↗

About

Which takes one or more arguments. For each of its arguments it prints to stdout the full path

of the executables that would have been executed when this argument had been entered at the shell prompt.

It does this by searching for an executable or script in the directories listed in the environment

variable PATH using the same algorithm as bash.

The GnuWin32 port of Which searches for a matching file in the following sequence of directories:

- The current directory.

- The directories that are listed in the PATH environment variable.

If the filename given on the command line cannot be found in any of the above directories,

the search is repeated with the extensions given in the environment variable PATHEXT until a match occurs.

If PATHEXT is empty or does not exist, a value of ".com;.exe;.bat;.cmd" is assumed.

Installers · v2.20

ArchitectureTypeScopeInstallDownload
x86portable-Direct↗

Copy a command tailored to that specific architecture, type, and scope - useful when winget would otherwise pick a different default.

Related apps

  • GnuWin32: GzipGnuWin32
    GnuWin32.Gzipv1.3.12-1

    gzip (GNU zip) is a compression utility designed to be a replacement for compress. Its main advantages over compress are much better compression and freedom from patented algorithms.

    →
  • GnuWin32: GrepGnuWin32
    GnuWin32.Grepv2.5.4

    Grep searches one or more input files for lines containing a match to a specified pattern. By default, grep prints the matching lines.

    →
  • GnuWin32: DiffUtilsGnuWin32
    GnuWin32.DiffUtilsv2.8.7-1

    GNU Diffutils is a package of several programs related to finding differences between files.

    →
  • GnuWin32: ZipGnuWin32
    GnuWin32.Zipv3.0

    Zip is a compression and file packaging/archive utility. Although \highly compatible both with PKWARE's PKZIP and PKUNZIP utilities for MS-DOS and with Info-ZIP's own UnZip, our primary objectives have been portability and other-than-MSDOS functionality.

    →
  • GnuWin32: UnZipGnuWin32
    GnuWin32.UnZipv5.51-1

    UnZip is an extraction utility for archives compressed in .zip format (also called "zipfiles").

    →
  • GnuWin32: TreeGnuWin32
    GnuWin32.Treev1.5.2.2

    A recursive directory listing program that produces a depth indented listing of files.

    →

More from GnuWin32.

Frequently asked questions

How do I install Which for Windows on Windows?⌄
Open Windows Terminal, PowerShell, or Command Prompt and run: winget install --id GnuWin32.Which --exact --version 2.20. winget downloads the installer from GnuWin32 and runs it. Requires Windows 10 (1809+) or Windows 11.
How do I install Which for Windows silently for unattended deployment?⌄
Add --silent and accept the agreements upfront: winget install --id GnuWin32.Which --exact 2.20 --silent --accept-package-agreements --accept-source-agreements. This is the variant Intune, Configuration Manager, and other deployment tools should use.
How do I uninstall Which for Windows via winget?⌄
Run: winget uninstall --id GnuWin32.Which --exact. Add --silent for unattended uninstalls. winget will use the registered uninstaller from Which for Windows's Apps & Features entry.
Is Which for Windows free?⌄
Which for Windows is distributed under GnuWin License. Refer to the publisher (https://gnuwin32.sourceforge.net/packages/which.htm) for the full license terms - Wingetly itself does not charge for installation.
Does Which for Windows work on Windows 10?⌄
Yes, as long as your Windows 10 build supports winget (1809 or newer). winget ships with App Installer on Windows 10/11 and pulls Which for Windows directly from the publisher.
How do I keep Which for Windows up to date?⌄
Run winget upgrade --id GnuWin32.Which --exact, or winget upgrade --all to update everything winget tracks. We index 1 version of Which for Windows from microsoft/winget-pkgs.
Homepage↗License · GnuWin License↗Publisher↗
Wingetlywingetly

Browse, bundle, install. Every winget app in one place.

An independent index for the Windows Package Manager ecosystem.

Catalog

  • All apps
  • Packs
  • Docs

Project

  • Privacy
  • About
Sponsor

Wingetly is sponsored by Pckgr - automated application patching for Microsoft Intune.

Learn more ↗
© 2026 WingetlyData from microsoft/winget-pkgs