cmdxray / commands / which

What does which do?

locate a command — print the full path of the executable that would run.

▸ Explain your own which command →

which examples, explained

$ which python

  • whichlocate a command — print the full path of the executable that would run
  • pythonan argument passed to the command

$ which -a node

  • whichlocate a command — print the full path of the executable that would run
  • -aprint ALL matching executables on PATH, not just the first
  • nodean argument passed to the command

which flags & options

-aprint ALL matching executables on PATH, not just the first
-sprint nothing; just set exit status (found / not found)

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.