[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to add dir to path

Hi Andrei,

On 8/10/07, Andrei Popescu <andreimpopescu@gmail.com> wrote:

Just look at your .bash_profile:

# ~/.bash_profile: executed by bash(1) for login shells.

And in .bashrc I find:

 # ~/.bashrc: executed by bash(1) for non-login shells.

So this is my conclusion:
Whenever I open a new bash window, .bash_profile is executed,
coz bash is invoked as: /bin/bash --login.

On the other hand, when I open a new session, obviously there's
no need to invoke it as /bin/bash --login and thus .bashrc is executed.

I found a very useful link to learn more about shells:

Thanks for your response, Manon.

Reply to: