This question already has an answer here:

I've been installing some software to a new VM today, and started wondering about the PATH variable. Some of the installation scripts I poked through would append to $PATH, and others would prepend $PATH. Personally, I've always just appended whenever I've needed to add to it.

Is there any functional difference between the two techniques, or is it just personal preference? My gut feeling is that it shouldn't make any difference.


marked as duplicate by Jesse_b, sourcejedi, Kusalananda linux May 11 '18 at 19:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    If duplicate programs exist the one that appears first in the path will be used over the latter. – Jesse_b May 11 '18 at 18:53

Browse other questions tagged or ask your own question.