1

The which command does not seem to be giving the right result:

[ray@localhost ~]$ unalias python
bash: unalias: python: not found
[ray@localhost ~]$ unalias which
bash: unalias: which: not found
[ray@localhost ~]$ which python
/usr/local/bin/python
[ray@localhost ~]$ /usr/local/bin/python -V
Python 2.7.6
[ray@localhost ~]$ python -V
Python 2.6.6
[ray@localhost ~]$ ls -l /usr/local/bin/python*
lrwxrwxrwx. 1 root root   11 Jun 10 12:27 /usr/local/bin/python -> python2.7.6
-rwxr-xr-x. 1 root root 8040 Jun 10 12:21 /usr/local/bin/python2.7
-rwxr-xr-x. 1 root root 8040 Jun 10 12:25 /usr/local/bin/python2.7.6
-rwxr-xr-x. 1 root root 1674 Jun 10 12:23 /usr/local/bin/python2.7-config
lrwxrwxrwx. 1 root root   16 Jun 10 12:23 /usr/local/bin/python2-config -> python2.7-config
lrwxrwxrwx. 1 root root   14 Jun 10 12:23 /usr/local/bin/python-config -> python2-config
[ray@localhost ~]$ 
2
  • Though not the problem here, here is some good reading about why not to use which with bash Commented Jun 13, 2016 at 11:37
  • I'm setting that aside for a day I can focus on it. Looks interesting! Commented Jun 16, 2016 at 17:10

1 Answer 1

3

No, which is fine. bash is confused.

hash -d python
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks! What does -d do?
Exactly what help hash says it does.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.