Re: newbie: startup files under bash...
alan brown wrote:
My reading has told me that when I start up a new bash shell
/etc/profile and /etc/bash.bashrc are run. And then ~/.profile and
~/.bashrc and ~/.bash_profile are run
So I?m trying to set the PATH environment variable to include my java
bin directory. So I created a .profile file in my home directory (one
didn?t exist before) and simply put in the line?
However, when I started up a new shell and ran ?echo $PATH? it didn?t
Not only that, but the path that was returned to me did not appear in
any of the above files.
Is there some other file that I?m missing that has been read and defined
the PATH variable?
What is the right file to set my PATH variable?
Thanks in advance.
The system load .bashrc or .bash_profile according wether you log in a
console or not. Make all your changes in .bashrc and tell
.bash_profile to load .bashrc (just uncomment the appropriate line in
.bash_profile). Don't forget to open a new xterm or to log out and to
log in again in order to tell bash to reread the file.