PDA

View Full Version : How to change environment variables permanently?



newyilang
9th May 2006, 04:04 PM
Hello, I am a novice of Linux.

I tried to change my langguage environment variable by typing the following command in a terminal:

#export PATH=$PATH:/root/XYZ

and then the command take effect. However, when I login the next time, the environment variable was lost. :(


How to keep it permanently?

giulix
9th May 2006, 04:13 PM
Put it into a file named .bashrc in your home directory if you want it to affect only your user environment; in /etc/profile if you want the setting to be system-wide (i.e. for all users).

newyilang
9th May 2006, 04:29 PM
Thanks, the problem was settled now