Linux Platform

which

Localiser l'emplacement d'une commande

localisationcommandecheminsystème

Syntaxe

which [OPTIONS] COMMANDE...

Options principales

OptionDescription
-aAfficher toutes les occurrences trouvees
-sMode silencieux, retourne uniquement le code
-iIgnorer les alias et fonctions shell

Exemples

Localiser une commande

$ which python3
/usr/bin/python3

Afficher toutes les occurrences d'une commande

$ which -a python
/usr/bin/python
/usr/local/bin/python

Verifier l'emplacement de plusieurs commandes

$ which git node npm
/usr/bin/git
/usr/local/bin/node
/usr/local/bin/npm