How to get bash_profile to auto-source in terminal

bash

#1

Whenever I start up my workspace, I have to fully type out “source .bash_profile” each time and in each terminal I use. Since I don’t get paid by the keystroke, is there a way to have this auto-source as happens on my local machine?

Thanks!


#2

Is your .bash_profile in home dir or in workspace? if it is in home maybe it is not loaded because of ~/.profile, try moving the code from bash_profile to ~/.profile, or add the source command to it.


#3

It is at the workspace level. How do I find ~/.profile? I tried to open it from the command line from path ‘~/’, but it did not find it.


#4

run c9 open ~/.profile in from terminal, or use tree settings menu to add ~ to favorites.
bash looks for configuration files only in ~ so other directories won’t work.


#5

Perfect! Works as desired! Thank you!