PATH setting problem in Solaris 10
I have solaris 10 u9 installed, I as using default bash shell. I have tried to set a new PATH value by the following command
PATH=$PATH:/whtever/I/need but I concede the variable is not persist in boot time even in closing a terminal. So I enforced to ask u guys, how can I set environmental variable in Solaris which does not made u to do it again and again!!! THX all of u , which will show ur faces for a help!!! |
Hi,
You can set the new PATH in ~/.profile Regards |
Is there a way to done it on command line? there is and to specify exactly wht is the command? I have tried to export using "export" and nothing is changed. And if someone know at minimum the files that are affected is encouraged
|
You can put in ~/.profile:
Code:
export PATH=$PATH:/whtever/I/need Code:
source ~/.profile Note that no files are affected, since env. variables are stored in memory |
I am on root account and, there is no a file ~/.profile under /(root). and does I have to create it? if I have to, I have fears on setting environments perfectly. so wht should I do next?
|
If it doesn't exist, sure you need to create it.
If you fear to break something, open another terminal as root, create the .profile, source it and see if it works as expected. If something goes wrong and you can't unset the PATH, go to the previous terminal and delete .profile (or comment out the export statement). |
All times are GMT -5. The time now is 11:17 PM. |