I am trying to set the user environment variables in home directory in bash_profile. But in home directory, 1)on running ls -l|grep bash_profile,no file is shown 2)For every session, I have to run source ~/.bash_profile to get the environment variables.What is the other way round to get the variables without running the source command every time. Please suggest the solutions.
31 Answer
Include that source command into .bashrc to run it automatically when opening a terminal. You only see a hidden file, i.e. a file of which the name starts with a dot, in the output of ls if you use the -a option.