%general-entities; ]> $LastChangedBy$ $Date$ <application>which</application>-&which-version; and alternatives Which The presence or absence of the which program in the main LFS book is probably one of the most contentious issues on the mailing lists. It has resulted in at least one flame war in the past. To hopefully put an end to this once and for all, presented here are two options for equipping your system with which. The question of which which is for you to decide. The first option is to install the actual GNU program which. Introduction to <application>which</application> Package information Download (HTTP): Download (FTP): Download MD5 sum: &which-md5sum; Download size: &which-size; Estimated disk space required: &which-buildsize; Estimated build time: &which-time; Installation of <application>which</application> Install which by running the following commands: ./configure --prefix=/usr && make Now, as the root user: make install Contents Installed Program Installed Libraries Installed Directories which None None Short Descriptions which shows the full path of (shell) commands installed in your PATH. which The 'which' script The second option (for those who don't want to install the program) is to create a simple script (execute as the root user): cat > /usr/bin/which << "EOF" #!/bin/bash type -pa "$@" | head -n 1 ; exit ${PIPESTATUS[0]} EOF chmod 755 /usr/bin/which chown root:root /usr/bin/which This should work OK and is probably the easiest solution for most cases, but is not the most comprehensive implementation.