1

Why does this command have this output?

$which -a python
/usr/local/bin/python
/usr/local/bin/python
/usr/bin/python

Specifically, why is "/usr/local/bin/python" listed twice?

The "/usr/local/bin" directory only occurs once in my PATH.

I've only noticed this happening for homebrew installed software thus far.

I'm not certain exactly which version of the which command I am using. But I think it comes from Apple.

$which -a which
/usr/bin/which
  • Is Python linked from somewhere else in the search path? – Tyson Feb 7 '16 at 12:25
1

which searches your PATH variable for instances of the program. With a -a option it lists all instances of the program's path. Your PATH variable has two instances of /usr/local/bin, that is why you see the program path listed twice.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .