Mailing List Archive


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

Re: [tlug] .bashrc not being source correctly



On Fri, Aug 27, 2010 at 12:30, Bruno Raoult <braoult@example.com> wrote:
>> Richard, you've nailed it. I didn't know that .bashrc is not used for
>> login shells ... 'su' without the '-' does indeed source everything
>> correctly.
> Strange, as it does not correspond to what happens on my system (as
> explained in my last email - sorry for top-posting by the way).
>
> I don't have a .bash_profile (only .bashrc). .bashrc is evaluated with
> both "su" and "su -".
>
> Bruno.

OK, I got it. My Ubuntu installs by default a ".profile" for new users
(when created with "useradd").
This ".profile" is read by bash for login shells, and...  it sources
.bashrc if the file exists !!

That is why my.bashrc was evaluated for both login and non login shells...

Bruno.


-- 
2 + 2 = 5, for very large values of 2.


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links