What startup scripts—in the order that they are called—set the PATH variable when opening a BASH shell in Terminal.app on OS X?
What startup scripts—in the order that they are called—set the PATH variable when opening
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’ve found the culprit. The secret sauce was
/usr/libexec/path_helperit looks in the file/etc/pathsand in the directory/etc/paths.d/.First
bashsources/etc/profilewhich executes the following code:Next
bashlooks for~/.bash_profile,~/.bash_login, and~/.profile.Listing these steps out,
PATHis built as follows:/etc/pathsare added toPATH/etc/paths.d/are appended toPATH— Note, that these are appended versus being prepended.PATH={DIR_2_ADD}:"${PATH}"statements in my~/.bash_profileand~/.bashrcfiles are prependPATH