how to set environment variable shell script code example Example: shell set environment variable export VARNAME="my value" # shorter, less portable version