On 4/8/2006 1:52 PM, Bradley Wagner wrote:
> On Apr 8, 2006, at 1:20 PM, Duncan Murdoch wrote:
>
>> I have a fairly simple setup, so in fact sshd leaves setting the
>> path to my shell (bash). It gets a basic one from /etc/profile,
>> and modifies it in ~/.bashrc. I don't know if this is a standard
>> setup or not.
>
> Duncan, I have located where this path gets set and it is indeed
> in .bashrc. Thanks for your help. I'm not sure why it ignores
> commands in /etc/profile but respects those in $HOME/.bashrc but that
> seems to be place where it gets set. While we're on the topic, do you
> know the difference between .bash_profile and .bashrc in these two
> instances? I always thought they were synonymous but ssh clearly
> reads in .bashrc while ignoring .bash_profile.
The bash man page explains this as follows:
~/.bash_profile
The personal initialization file, executed for login shells
~/.bashrc
The individual per-interactive-shell startup file
A login shell is one whose first character of argument zero is a -, or
one started with the --login option.
An interactive shell is one started without non-option arguments and
without the -c option whose standard input and error are both connected
to terminals (as determined by isatty(3)), or one started with the -i
option. PS1 is set and $- includes i if bash is interactive, allowing
a shell script or a startup file to test this state.
Duncan Murdoch
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Apr 8 20:25:51 2006