Which

From Linuxintro
Revision as of 09:12, 11 June 2011 by imported>ThorstenStaerk (Created page with "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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The command which is an easy way to find out where an executable program comes from. As an example:

 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.

See also