On Wed, Mar 22, 2017 at 9:02 AM, Hogren <hog...@iiiha.com> wrote:
> On 22/03/2017 13:58, Hogren wrote:
>> On 22/03/2017 13:57, Hogren wrote:
>>> On 22/03/2017 13:42, Arthur Țițeică wrote:
>>>> În ziua de miercuri, 22 martie 2017, la 14:34:50 EET, Hogren a scris:
>>>>>
>>>>> Anybody knows why ~/.bashrc is not running on the first Bash
>>>>> opening ?
>>>>
>>>> Maybe you're missing '.bash_profile'. Look in /etc/skel/ for an
>>>> example.
>>>
>>> I don't understand. What do I have to in ~/.bash_profile to run
>>> .bashrc, even at the first logon ?
>>>
>>> I have nothing in /etc/skel.
>>>
>>> /etc/skel $ ls -l
>>> total 0
>>
>> Stupid Hogren… ls -a …
>
> Ok it works, thanks !
>
> Can you explain to me why the ~/.bashrc is sourced in subshells without
> .bash_profile ?

Because when you login, you're in a login shell (PS1 prepended with
"-") so ".bashrc" is sourced from ".bash_profile", ".bash_login", or
".profile" if you have one of them.

Whereas the subshell is an interactive, non-login shell, so ".bashrc"
is sourced directly.

Reply via email to