change the environment variable in linux from bash script code example
Example 1: shell set environment variable
export VARNAME="my value" # shorter, less portable version
Example 2: set environment variable linux
vi ~/.bash_profile
export VARNAME="my value" # shorter, less portable version
vi ~/.bash_profile