> >I have set PATH in .bashrc; however, it is reset later so that my
> >changes get overwritten. Where does this happen, and what can I do? I
> >know that .bashrc is being run because I put an echo in which I see.
>
> as you may have missed, the last thing .bashrc does is check if there is
> an /etc/bashrc. This usually is created automatically. In there there's
> also a PATH and that is what may override your own path.
> Best thing is to put the path in your .bash_profile. Works great for me:
>
> # User specific environment and startup programs
> PATH=$PATH:$HOME/bin:
Paul, the only problem with putting a path in your .bashrc file (I have
one there) is the order of evaluation. You're referring to the code
if [-f /etc/bashrc ]; then
. /etc/bashrc
fi
If you put any path additions you want AFTER this with a syntax like
PATH= put additions here, they will take affect just fine
If you want to keep the path in /etc/bashrc (all the standard stuff) you
can simply use
PATH=$PATH: additions here
and your additions will follow the standard path checks.
Cheers --- Larry