Setting Environment variable in Linux

March 5, 2009 at 11:10 AM | Posted in Linux | 2 Comments

The following setting is for FC8 Linux. The file name or path may change for different flavor of Linux
For system wide effect , edit /etc/bashrc file and for particular user edit file home/<username>/.bash_profile and add your environment variable. For example, adding JAVA_HOME variable
#export JAVA_HOME=/usr/bin
Then save the file and run it using source command.
#source /etc/bashrc or source /home//.bash_profile
You can test it by
echo $<your_variable_name>

Blog at WordPress.com.
Entries and comments feeds.