Ravi Sir's Cards › AWS
type vs which
This comparison card contrasts type and which. type is described as shell view of a name. which is described as pATH file search. The card pairs type with debug what runs, and which with find the binary.
Read card text
What this card says
Lookup
type
Shell view of a name.
which
PATH file search.
Key points
Sees aliases and builtins.
Only files in PATH.
Example
type -a ls
Use when
Debug what runs.
Find the binary.