== An inexplicable omission in bash's sourcing of _.bashrc_ I discovered recently that I missed a case in my writeup of [[when bash sources your _.bashrc_ WhenBashrc]], or technically I didn't miss a case because bash has an inexplicable omission: bash doesn't source your _.bashrc_ when you ssh in with a pty. That is, if you do: > ssh -t host command ... Your _.bashrc_ is *not* sourced. Neither does bash source your _.login_ (well, of course). This was an unpleasant surprise when I found it out recently, since on some of our systems we use ssh to do things that we want to interact with, and they involve commands that are not on the default _$PATH_. Up until recently I was counting on _.bashrc_ to fix up that problem, which is how I came to discover the issue. (There's nothing like actually trying your plans out.) I assume that this is caused by a misfire in the bash heuristics that try to figure out if you are ssh'ing in. Hopefully this means that it will be fixed in the future (although some of the systems affected by this are Solaris machines, which are unlikely to get new versions of bash any time soon). (Although it might be tempting to see this as an argument against such heuristics in general, I don't agree with that position. For better or worse, bash's heuristics to source _.bashrc_ when you ssh in give you generally useful behavior. And taking away features entirely just because they can't be implemented perfectly is not generally very helpful.)