Root Environment

I want to add something to the root environment, but I'm not sure where exactly the env file for root is. Where would I find it, and is it a .profile, or .login type file?
[187 byte] By [miklos1] at [2007-11-25 23:23:12]
# 1

.profile is for sh/.login is for csh

Machine wide setting can be done by editing /etc/profile

# The profile that all logins get before using their own .profile.

For root, like for all sh-ish user, the login shell will read /etc/profile then the .profile in the user home directory, i.e. for root normaly /

Cheers

Nicolas_Dumeige at 2007-7-5 18:10:30 > top of Java-index,General,Talk to the Sysop...
# 2
Thank you for your help. I found the profile file, but I'm still confused. When I type env I got an entirely different environment than what is in /etc/profile. Is that another file?
miklos1 at 2007-7-5 18:10:30 > top of Java-index,General,Talk to the Sysop...
# 3

Can you more specific.

If you don't see in your environnement, variables you added in /etc/profile :

1) You have to source /etc/profile after changes, either by logging again or typing ". /etc/profile" at the shell prompt.

2) You need to export the variable like this :

MY_VAR=my_value

export MY_VAR

3) If you're modifiying variable that yet exists, if you want to preserve previous value, use the following synthax:

PATH=$PATH:/new_path/entry ; export PATH

Hope that helps

Nicolas_Dumeige at 2007-7-5 18:10:30 > top of Java-index,General,Talk to the Sysop...