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.
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
To see what is currently set within your current shell, simply enter :
env
and a list of settings is displayed.
To view the value of a single variable - MYVAR - enter :
echo $MYVAR
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
Some different shell syntaxes are shown :
setenv SOME_VAR "some value" setenv NEW_VAR "$OLD_VAR"
export SOME_VAR "some value" export NEW_VAR $OLD_VAR
SOME_VAR = "some value";export SOME_VAR NEW_VAR = $OLD_VAR;export NEW_VAR
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.
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.
You need to ensure two things :
PATH or executed from
its own directory and the current directory is on the PATH.
chmod +x <file>