Setting environmental variable for all the users in the box

Hi,

I have Sun solaris x64 box in which i need to set a Environment variable for all the users in the box. This Environment varible is used by the application on the box.

Could any one please help me in setting the Environment variable.

Thanks,
Firestar

put the setting in /etc/profile

I tried keeping in /etc/profile
but when i hit env in the shell it is not showing up....

Not sure what shell you're using but if you're using /bin/sh it doesn't like the shortened version of export. So, instead of using...
export ENVVAR=value

Instead use

ENVVAR=value
export ENVVAR

bash and ksh are the only ones that won't bomb on the shortened version. But, either way, make sure you've got your export in there.

Files don't read themselves and environment variables don't set themselves. /etc/profile usually gets read as part of the login process so the changes should show up when you log out and log back in.

Thank you. It worked.

My pleasure, glad I could help :smiley: