Overview - which and whereis for commands
What is it?
The commands 'which' and 'whereis' help you find where programs or commands are located on your Linux system. 'which' shows the path of the executable that runs when you type a command. 'whereis' gives more information, including locations of the executable, source code, and manual pages. Both are useful to understand what runs when you enter a command.
Why it matters
Without these commands, you might not know which version of a program runs or where it is stored. This can cause confusion if multiple versions exist or if a command is missing. Knowing the exact location helps in troubleshooting, scripting, and managing your system effectively.
Where it fits
Before learning these, you should understand basic Linux commands and the concept of the PATH environment variable. After mastering these, you can explore more advanced command discovery tools like 'type' and 'command -v', and learn about shell scripting and environment management.