Online Linux Terminal Logo
OnlineLinuxTerminal
NavigationCLI Manual

$which

Locate the executable binary path of a command in system PATH.

Syntaxe de la commandePOSIX Standard
which [OPTIONS] [COMMAND...]
Communauté Linux2.4k En ligne

Échangez avec des utilisateurs Linux, apprenez des commandes et téléchargez des PDF.

Essayer en direct dans le bac à sable interactif

Simulation côté client sans installation avec retour instantané.

Ouvrir dans le terminal plein écran ↗
bash — terminal

Aperçu et fonctionnement

`which` searches the directories listed in your `$PATH` environment variable to find and display the absolute location of an executable binary file.

Options et drapeaux courants

Flag / OptionDescription
-aPrint all matching pathnames of each argument across PATH.

Exemples pratiques du monde réel

#1Find where python3 or grep is installed
which grep python3

Outputs the binary paths in /usr/bin or /bin.