Re: How to add dir to path
Manon Metten(manon.metten@gmail.com) is reported to have said:
> Hi,
>
> This thread ain't over yet. Apart from using ~/bin (as Andrei Popescu
> suggested) I noticed that adding 'export PATH=$HOME/scripts:$PATH'
> to the end of ~/.bash_profile, the newly added dir is not available in
> any new session I open. However, when I open a new bash window,
> the new dir is available. Something like this:
>
> Bash Win1
> - Session 1: ~/scripts YES
> - Session 2: ~/scripts NO
> ...
> - Session X: ~/scripts NO
>
> Bash Win2:
> - Session 1: ~/scripts YES
> - Session 2: ~/scripts NO
> ...
> - Session X: ~/scripts NO
>
> etc.
>
> So just to try, I've put 'export PATH=$HOME/scripts:$PATH' in
> /etc/profile but that didn't make any difference. Then I placed it
> in ~/.bashrc and yep! ~/scripts available in every session.
>
> Is this default behavior or don't I just understand it?
If (?) I understand your question correctly
Any changes made to .bash_profile or .bashrc require a restart of that
file.
If you have at the end of the .bash_profile, the command
. .bashrc
Then after editing either one, you do
. .bash_profile ( which is the same as logging out & back in)
the new commands you entered will then work. Musch faster then a
logout/login.
Hope I understood you correctly.
Wayne
--
Cannot load Windows 95, Incorrect DOS Version.
_______________________________________________________
Reply to: