On my OS X system, when I use a subshell (for example with screen
), the settings in my .bash_profile
are inherited, but on Ubuntu, they are not, and in order to get the same behavior I have on OS X I have to add
source ~/.bash_profile
to the start of my .bashrc
.
Does Ubuntu (Linux) handle the relationship between .bash_profile
and .bashrc
and their use in subshells differently from OS X (BSD)? Is there an Ubuntu setting that makes it behave like OS X in this regard so that I can avoid the above line?
/etc/profile
and~/.profile
to see what differs there between the two systems I have? – orome May 24 '16 at 12:30~/.bash_profile
are in effect when Iscreen
, and those in~/.bashrc
are as well (I get the effect of the former followed by the latter). But on Ubuntu, I get only the latter (~/.bash_profile
settings are not used). Perhaps there's ascreen
setting on Ubuntu that does not inherit the parent shell's settings? – orome May 24 '16 at 15:13.bashrc
is not sourced by.bash_profile
. That leaves the questions of howscreen
inherits (a) inherits all of.bash_profile
(when Ubuntu does not) and (b) also reads.bashrc
. – orome May 24 '16 at 16:03