Post History
which only tells you about a path that would be found in PATH. Often, people who think they have this question have a more general question - i.e., what will be used when the named command is reque...
Answer
#1: Initial revision
`which` only tells you about a path that would be found in PATH. Often, people who think they have this question have a more general question - i.e., *what will be used* when the named command is requested. In particular, aside from being executables on PATH, commands can also refer to shell builtins. The `type` command gives this information. With the `-a` flag, it can also disclose multiple implementations of a command, in preference order. For example, on my system: ``` $ type -a echo echo is a shell builtin echo is /usr/bin/echo echo is /bin/echo ``` The `echo` executable on my system is hard-linked in those locations, but neither would ordinarily be used (as the shell builtin would be preferred).