To make lasting changes to the value of an environment variable:
1. Use your editor to open the .bash_profile file and add the line:
VARNAME=value_of_variable;export VARNAME
2. Save the file and leave the editor.
3. Enter the command:
source $HOME/.bash_profile
This adds the new value to your working environment.