[BusyBox] Global environment variables

Richard June rjune at imagestream.com
Mon Sep 10 14:44:14 UTC 2001


David Douthitt wrote:

> Matt Kraai wrote:
> 
>>On Fri, Sep 07, 2001 at 04:09:47PM +0200, Olsen Martin seebach wrote:
>>
>>>How do I set environment variables so that they are visible to all users?
>>>Using env only sets it for the current session.
>>>
>>This is a general Unix question, not a BusyBox specific one.
>>Please use a different forum in the future.
>>
> 
> Matt's right; comp.unix.shell would be a good place to ask this... as
> long as you read the FAQ first (this question is probably there).
> 
> 

if he's using one of the busybox shells, this would be a perfectly valid 
forum to ask.

>>That said, you can probably set them in /etc/profile.  Most shells
>>source that.
>>
> 
> And you probably want to use "export" to make the environment variable
> visible to all subshells.  You didn't say which shell you were using
> (ash, sh, bash, ksh, or csh) but it goes something like this:
> 
> FOO=myvalue
> export FOO
> 
> ...works in ksh and sh, or
> 
> export FOO=myvalue
> 
> ...works in ksh only.

export FOO=myvalue works fine in at least later versions of bash, I've 
done that since RH 6.0 at least.





-- 
Richard June (rjune at imagestream.com)
msn          : rolfan__ at hotmail.com  |  aim          : ISisSupport
Yahoo        : Fat_Happy_Penguin     |  icq          : 3283795
Jabber ID    : rolfan at firbolg.bravegnuworld.com






More information about the busybox mailing list