Which
From Linuxintro
The command which is an easy way to find out where an executable program comes from. As an example:
- open a console
- Find out where ls, which and alias is situated:
tweedleburg:~ # which ls /bin/ls tweedleburg:~ # which which /usr/bin/which tweedleburg:~ # which alias which: no alias in (/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/NX/bin:/usr/lib/qt3/bin)
in the case of alias we find out it is a shell builtin.