Q: How do I set an environment variable on Athena?
Answer
The procedure for setting an environment variable differs based on whether you are using the Bash shell or the Tcsh shell. If you're not sure which shell you're using, please see our article: How can I figure out what my default Athena shell is?
Bash
The syntax for setting an environment variable in Bash is:
export VARIABLE=value
For example, to set the PRINTER variable to ajax, you would type the following:
export PRINTER=ajax
You can place such commands in your ~/.bash_environment file or your ~/.bashrc.mine file.
Tcsh
The syntax for setting an environment variable in Tcsh is:
setenv VARIABLE value
For example, to set the PRINTER variable to ajax, you would type the following:
setenv PRINTER ajax