Why does this command have this output?

$which -a 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
  • Is Python linked from somewhere else in the search path?
    – Tyson
    Commented Feb 7, 2016 at 12:25

1 Answer 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 .