Have you ever typed git clone or git --version and wondered where the Git binary is actually being executed from?
Linux provides a simple command that lets you locate the binary path of almost any application available in your shell.
which <application_name>
For example, to find the location of the Git binary, run:
which git
The output will look similar to:
/usr/bin/git
This tells you that when you execute the git command, Linux is running the binary located at /usr/bin/git.
The which command is particularly useful when:
- Verifying which version of an application is being executed.
- Troubleshooting PATH-related issues.
- Checking whether multiple versions of the same application are installed.
#linux
0 Comments