Skip to content

Instantly share code, notes, and snippets.

@romach
Created April 9, 2017 20:58
Show Gist options
  • Save romach/ced2b8ad2777cd32be62467e7e312773 to your computer and use it in GitHub Desktop.
Save romach/ced2b8ad2777cd32be62467e7e312773 to your computer and use it in GitHub Desktop.
Environment variables
# $PATH - programs paths
# create
NUMBER=1
# delete
unset NUMBER
# print
echo $NUMBER
# show all env vars in session
env
# pass environment variable to program
NUMBER=1 myprogram
# export env var for current session
export NUMBER=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment