On Thu, Jun 10, 2010 at 4:23 PM, ANKIT SINGHAL <[email protected]>wrote:

>
>
> On Sun, Jun 6, 2010 at 10:07 AM, Debasish Ray Chawdhuri <
> [email protected]> wrote:
>
>> For setting system-wide variables, you should use /etc/profile
>> and for setting user specific variables, you should use ~/.bash_profile
>>
>> Aliases and other things go in the bashrc files
>>
>>
>> On Sun, Jun 6, 2010 at 10:01 AM, Debasish Ray Chawdhuri <
>> [email protected]> wrote:
>>
>>> By ".bashrc for root", I meant /root/.bashrc
>>>
>>>
>>> On Sun, Jun 6, 2010 at 9:59 AM, Debasish Ray Chawdhuri <
>>> [email protected]> wrote:
>>>
>>>> It depends on what you want
>>>>
>>>>
>>>> On Sat, Jun 5, 2010 at 2:01 PM, narendra sisodiya <
>>>> [email protected]> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Sat, Jun 5, 2010 at 9:35 AM, Debasish Ray Chawdhuri <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> The bashrc is in /etc directory.
>>>>>>
>>>>>
>>>>> Wrong,, this will affect system level setting
>>>>>
>>>>> use
>>>>> /home/usename/.bashrc file
>>>>>
>>>>>
>>>>>
>>>>>>  And if you don't export, the variable will not be available to the
>>>>>> child shells, one of which is your command prompt.
>>>>>> So, Narendra is right. Modifying .bashrc of root will only affect
>>>>>> root's environment.
>>>>>>
>>>>>> you can do either export var='asdfa', or  var='asdfa' and then export
>>>>>> var. Both of these have the same effect.
>>>>>> --
>>>>>> Debasish Ray Chawdhuri
>>>>>> Dept. of Textile Technology,
>>>>>> IIT Delhi
>>>>>>
>>>>>>  --
>>>>>> l...@iitd - http://tinyurl.com/ycueutm
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> ┌─────────────────────────┐
>>>>> │    Narendra Sisodiya
>>>>> │    http://narendrasisodiya.com
>>>>> └─────────────────────────┘
>>>>>
>>>>> --
>>>>> l...@iitd - http://tinyurl.com/ycueutm
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Debasish Ray Chawdhuri
>>>> Dept. of Textile Technology,
>>>> IIT Delhi
>>>>
>>>
>>>
>>>
>>> --
>>> Debasish Ray Chawdhuri
>>> Dept. of Textile Technology,
>>> IIT Delhi
>>>
>>
>>
>>
>> --
>> Debasish Ray Chawdhuri
>> Dept. of Textile Technology,
>> IIT Delhi
>>
>> --
>> l...@iitd - http://tinyurl.com/ycueutm
>>
>
>
>
>
>
>
>
> u all are right  that .bashrc of root affect root environment
> and that of /home/user affect user environment
>
>
> by the way i have exported the variable in /home/user/.bashrc
>
> and i am able to view its  value after running echo $var c0ommand
>
>
> but the problem is that the program that wants this variable is not able to
> recognize this variable and asks to set this variable first.
>
> the program assumes that this variable var does not exist
>
>
> also i donot know where to make changes in /etc/profile
>
> and what is ~/.bashrc
>
>
> i have written
export var="value"
in /etc/environment

but still the same problem exists

-- 
l...@iitd - http://tinyurl.com/ycueutm

Reply via email to