How can I establish “shared” variables for all Bash instances on a machine? [duplicate]

0 votes
asked Aug 19, 2013 by marc-ortiz

This question already has an answer here:

  • Setting environment variables on OS X 30 answers

2 Answers

+1 vote
answered Aug 19, 2013 by iamauser

From the DYLD_LIBRARY_PATH it seems you are using Mac. You can put these in ~/.bashrc. If your current $SHELL is bash then each time you open a Terminal it should execute those lines and they will be available to read/modify later. e.g. echo $DYLD_LIBRARY_PATH

+1 vote
answered Nov 29, 2018 by jtravaglini

I think you'll want to put this logic in a file located in /etc/profile.d/, assuming you're using some Unix/Linux based distribution.

Welcome to Q&A, where you can ask questions and receive answers from other members of the community.
Website Online Counter