Access Keys:
Skip to content (Access Key - 0)

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

IS&T Contributions

Documentation and information provided by IS&T staff members


Last Modified:

July 08, 2011

Get Help

Request help
from the Help Desk
Report a security incident
to the Security Team
Labels:
olc-unix olc-unix Delete
bash bash Delete
tcsh tcsh Delete
shell shell Delete
c-dotfiles c-dotfiles Delete
athena athena Delete
environment environment Delete
variable variable Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
Feedback
This product/service is:
Easy to use
Average
Difficult to use

This article is:
Helpful
Inaccurate
Obsolete
Adaptavist Theme Builder (4.2.3) Powered by Atlassian Confluence 3.5.13, the Enterprise Wiki