up previous next contents
Next: Your Path Up: ksh Variables Previous: Built-In Shell Variables (   Contents

Other Shell Variables

These are variables that are not automatically set by the shell, but are typically defined in your .profile file, and are set when you log in. Some of the most important variables are shown below:

PATH=/usr/bin:/usr/ucb:/usr/local/bin:.

This defines where the shell searches for commands to be executed. The example above creates a search path that begins by looking in the directory /usr/bin, and then looks in the directory /usr/ucb, then /usr/local/bin, and finally looks in the current directory, indicated by the ..

Your PATH variable is explained more fully below.

PS1=$PWD>

PS1 is the environment variable that represents your primary prompt string. It defines the prompt you will look at. The example above is very similar to the typical DOS $P$G prompt.

TERM=vt100
export TERM

This variable tells the ksh what type of terminal you are working on. It is very important to have this variable set properly. Your TERM variable must match the terminal type that you are actually using. The above example shows how the terminal environment variable is set to a vt100.

Notice that it is also necessary to export this variable. When you export a shell environment variable, you are making this variable available to other sub-shells that you may create. For instance, when you run WordPerfect for UNIX, your TERM variable must be set and then exported for WordPerfect to run properly. WordPerfect runs in a sub-shell.


up previous next contents
Next: Your Path Up: ksh Variables Previous: Built-In Shell Variables (   Contents