This is not a "How To Use Unix" resource, just the minimum you need to know to be able to configure and use the software packages.

Environment Variables

The way that environment variables are set under unix depends on which shell you are using. You can confirm which shell by entering :

echo $SHELL

Listing Current Variables

To see what is currently set within your current shell, simply enter :

env

and a list of settings is displayed.

Single Variable

To view the value of a single variable - MYVAR - enter :

echo $MYVAR

Case Sensitive

Unlike the DOS derived Windows environments, environment variables are case sensitive. If unsure of the case of a specific variable, you can combine the env command with grep like this :

env | grep -i myvar

Setting Variables In Current Environment

Some different shell syntaxes are shown :

csh, tsh

setenv SOME_VAR "some value"
setenv NEW_VAR "$OLD_VAR"

bash

export SOME_VAR "some value"
export NEW_VAR $OLD_VAR

korn

SOME_VAR = "some value";export SOME_VAR
NEW_VAR = $OLD_VAR;export NEW_VAR

Setting Permanent System-Wide Variables

To set a variable for all shell environments you should edit the /etc/profile file.

Alternatively you can modify the shell specific initialization files such as : .cshrc, .tcshrc or .bshrc.

Delimiter

On Unix the character ':' (colon) is conventionally used to delimit lists of values set against an environment variable. The ';' (semi-colon) delimits separate commands, allowing them to be arranged on the same line.

Executing Command Files

You need to ensure two things :