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

Re: Strange .bashrc Problem



On Wed, Apr 25, 2018 at 10:49:52PM +0300, Abdullah Ramazanoglu wrote:
> It seems like when ~/.bash_profile did not exist, then ~/.bashrc is called
> directly.

That's not correct.

As a LOGIN shell, bash reads ONE file, searching among the following items
in sequence:

a) ~/.bash_profile
b) ~/.bash_login
c) ~/.profile

Whichever one it finds first, that's what it reads.  If you also want it
to read ~/.bashrc (you DO want this), then you must ensure that ~/.bashrc
gets sourced/dotted from whatever file bash DOES read.

> I gather that you had no ~/.bash_profile prior to installing HEX.

That's my guess as well.

> So I would suggest simply sourcing ~/.bashrc at the last line of ~/.bash_profile

If he has other stuff in ~/.profile then he may want to source ~/.profile
instead.  Then ~/.profile can source ~/.bashrc and everything should be
back to normal.


Reply to: