what does export do?
Paul Howarth
paul at city-fan.org
Mon May 23 15:18:56 UTC 2005
Rick wrote:
> linux user wrote:
> >>>> .bashrc example:
>>>>
>>>> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:home/linux/lib
>>>>
>>>> After adding the above line to the .bashrc file, the load
>>>
>>>
>>> library path will be the same for every terminal and doesn't have to
>>> be set each time a new terminal is opened.
>>>
>>>> If you want this path to be available to any terminal that is
>>>
>>>
>>> open you will have to "source .bashrc" at the command prompt.
>>> Otherwise, just close all active terminals and open new ones.
>>>
>>>>
>>> Errm don't you need to export that ie;
>>> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:home/linux/lib
>>> export LD_LIBRARY_PATH
>>
>>
>>
>>
>> No. Not in the .bashrc file.
>>
> I tried this both it /etc/bashrc and ~/.bashrc, it doesn't work without
> exporting it.
It'll be working for linux user because in the example shown, the
variable LD_LIBRARY_PATH will already be in the environment and hence
already exported.
Paul.
More information about the fedora-list
mailing list