Unix
The commands env, set, and printenv display all environment variables and their values. env and set are also used to set environment variables and are often incorporated directly into the shell. printenv can also be used to print a single variable by giving that variable name as the sole argument to the command.
In Unix, the following commands can also be used, but are often dependent on a certain shell.
export VARIABLE=value # for Bourne, bash, and related shells
setenv VARIABLE value # for csh and related shells
You can have a look at this at