/bin/sh does not read profile

Polytropon freebsd at edvax.de
Thu Mar 5 18:22:07 PST 2009


On Thu, 5 Mar 2009 18:11:18 -0800 (PST), Peter Steele <psteele at maxiscale.com> wrote:
> I have a similar problem, but with bash. I have both my personal
> account and root set to use bash instead of sh and when I login
> the .bashrc file is not read. My system does not have an X
> environment, it's plain old BSD. How can I get it to load .bashrc
> when I login? I'm using a 7.0 binary release. 

I read from the manpage bash-3.2.25 according to the FILES section:

       /etc/profile
              The systemwide initialization file, executed for login shells
       ~/.bash_profile
              The personal initialization file, executed for login shells
       ~/.bashrc
              The individual per-interactive-shell startup file

When the shell is the login shell (prefixed with - in the process
list), it seems that it needs to read ~/.bash_profile (and not
the ~/.bashrc file). So you could put

	. ~/.bashrc

into ~/.bash_profile to get a workaround.



-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list