Bash Does Not Source /etc/profile

Ottavio Caruso ottavio2006-usenet2012 at yahoo.com
Thu Aug 20 18:47:53 UTC 2020


On 20/08/2020 19:37, Drew Tomlinson wrote:
> I performed an binary upgrade from 12.0-p3 to 12.1-p8 and recompiled all
> ports.  My shell is set to /usr/local/bin/bash in /etc/passwd.  One thing
> that's puzzling is that /etc/profile is no longer sourced when I log in.
> However, if I source /etc/profile after I log in, there are no errors.
> 
> I have verified my shell is both login and interactive with these code
> snippets I found on the web:
> 
> [drew at blackcloud ~]$ shopt -q login_shell && echo 'Login shell' || echo 'Not
> login shell'
> Login shell
> [drew at blackcloud ~]$ [[ $- == *i* ]] && echo 'Interactive' || echo 'Not
> interactive'
> Interactive
> 
> What else should I check?

Copy ~/.profile to ~/.bash_profile and source /etc/profile from there.




-- 
Ottavio Caruso





More information about the freebsd-questions mailing list