/bin/sh does not read profile

Frank Shute frank at shute.org.uk
Thu Mar 5 18:27:17 PST 2009


On Thu, Mar 05, 2009 at 06:11:18PM -0800, Peter Steele wrote:
>
> >I first wondered why none of my commands in "/etc/profile" and 
> >"~/.profile" got executed. Finally, I modified 
> >"/usr/src/bin/sh/main.c" to trace what files are read, recompiled 
> >the "sh" command and: the only file that is executed is "~/.shrc". 
> > 
> >I just cannot believe that FreeBSD has such a severe bug. What is 
> >going wrong here? 
> 
> 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. 

You should be able to put:

source $HOME/.bashrc

in ~/.bash_profile

That's if $HOME is set. Otherwise use the full path.


Regards,

-- 

 Frank 


 Contact info: http://www.shute.org.uk/misc/contact.html 



More information about the freebsd-questions mailing list