3 ms·
Correct, because they do two different things. `which` is a standalone executable which searches the environment's PATH for the named command. It doesn't know
by jfrunyon 5y ago
Correct, because they do two different things.
`which` is a standalone executable which searches the environment's PATH for the named command. It doesn't know about commands which aren't executables (i.e. builtins and aliases).
`command` is a shell builtin which tells you exactly what that shell in its current state would run.
- jonnycomputer 5y agoInteresting, and useful to know. Thanks for that.