get environment variable in shell code example
Example 1: shell set environment variable
export VARNAME="my value" # shorter, less portable version
Example 2: bash get environment variable
Just type next command to list all environments varialbes in terminal:
printenv