which

Locate a program in the user's path. More information: <https://manned.org/which>.

Install

All systems
curl cmd.cat/which.sh
Debian Debian
apt-get install debianutils
Ubuntu
apt-get install npm
Alpine
apk add which
Arch Arch Linux
pacman -S which
image/svg+xml Kali Linux
apt-get install debianutils
CentOS
yum install which
Fedora
dnf install which
Windows (WSL2)
sudo apt-get update sudo apt-get install npm
OS X
brew install debianutils
Raspbian
apt-get install debianutils
Docker
docker run cmd.cat/which which powered by Commando

Locate a program in the user's path. More information: <https://manned.org/which>.

  • Search the PATH environment variable and display the location of any matching executables:
    which executable
  • If there are multiple executables which match, display all:
    which -a executable

© tl;dr; authors and contributors