[Techtalk] bash
Daniel Pittman
daniel at rimspace.net
Thu Jun 10 00:28:56 UTC 2010
Maria McKinley <maria at shadlen.org> writes:
> Chris Frey wrote:
>> On Wed, Jun 09, 2010 at 03:33:30PM -0700, Maria McKinley wrote:
>
>>> Quick question, hopefully not too dumb. I want to export a variable to be
>>> available to everyone when they log on, but it seems that when one ssh's in
>>> to our machines, the /etc/bash.bashrc isn't being read. Where else can I
>>> put it?
>>
>> Bash loads init scripts differently depending on whether it is a login
>> shell or not. For login shells (like ssh), try /etc/profile.
>>
>> The messy details are in the bash man page under the "INVOCATION" section. :-)
>
> Cool, I stuck it in /etc/profile, and did not have to reboot to have it take
> effect! Thanks a bunch.
Other people have done great with how this works; I just wanted to add that if
you restarted the ssh daemon with '/etc/init.d/ssh restart', that would have
*exactly* the same effect as rebooting the entire system.
Daniel
--
✣ Daniel Pittman ✉ daniel at rimspace.net ☎ +61 401 155 707
♽ made with 100 percent post-consumer electrons
More information about the Techtalk
mailing list