I had to install git from source on RHEL. After installation the git command is shown to be in /usr/local/bin/git
when trying the whereis
command.This path is available in $PATH
also.
When I type git it still says "Command not found." How to resolve this?
EDIT : output of various commands
$type git
type: Command not found.
$which git
git: Command not found.
$ls -l /usr/local/bin/git
-rwxr-xr-x 112 root users 5851488 Mar 15 20:07 /usr/local/bin/git
$whereis git
git: /usr/local/bin/git
$echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
EDIT: It works now but do not know why
I disconnected the telnet connection and logged in again few minutes back and find that the git command works. I am not sure what caused it to start working. This is confusing.
type git
,which git
,ls -l /usr/local/bin/git
outputs. – manatwork Mar 15 at 15:10file
and nottype
;-) so he wants (and I too) to see the output offile /usr/local/bin/git
– Huygens Mar 15 at 15:58type
is a shell builtin indash
,bash
andzsh
. In case you useksh
, you may have a good excuse for not knowing it. (In myksh
there is just an alias towhence
with the nametype
. Not sure how widespread is such setting.) pastebin.com/VzScxzRg – manatwork Mar 15 at 16:23