When I execute which -a python I get two paths:


If I delete the directory ~/anaconda3 the first link to the python binary automatically vanishes. How is it possible to create links like these? And how is the anaconda3 directory related to this without any special command?

  • 1
    yes my path variable includes /home/autumn/anaconda3/bin and also after only removing the anaconda3 directory the path variable automatically doesn't include the anaconda3 binary... how is that possible?! May 10 '18 at 14:08

which -a utility will return all paths from $PATH where utility is found.

If the utility is found in more than one path, several results will be reported.

In your case, you have a python executable in both /home/autumn/anaconda3/bin and in /usr/bin, and both of these directories are listed in your PATH variable. This is why which -a python returns two results. Removing python from either location would remove the corresponding line from the output of the command.

To only see the first found instance of python in your path, use either

which python


command -v python

Related: Why not use "which"? What to use then?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.