How to find application's path from command line?
If it is in your path, then you can run either type git
or which git
. The which
command has had problems getting the proper path (confusion between environment and dot files). For type
, you can get just the path with the -p
argument.
If it is not in your path, then it's best to look for it with locate -b git
It will find anything named 'git'. It'll be a long list, so might be good to qualify it with locate -b git | fgrep -w bin
.
The POSIX standard way to do this is command -v git
. All UNIX-like systems should support this.
whereis git
and you get the path to the command.
that is just if the git is in you PATH variable, in case you have installed it not through you package manager, it is more complex and you should use the find
or locate
commands.