$title = "Changing environment variables - setenv"; $area = "Unix Support"; $metadata = "unix, commands, shell, environment, variable, setenv"; $pfloc = ""; require '/usr/local/wwwdocs/ucs/fragments/header.phtml'; require '/usr/local/wwwdocs/ucs/fragments/header-bc.phtml'; ?>
To make a temporary change to the value of an environment variable enter the command:
setenv VARIABLE value
This value will remain until you logout of the system. To change the value of an environment variable permanently, the setenv command should be added to your .login file.
To set the printer for the current login session to be the local printer:
setenv LPDEST local_psa4
If vi is your favourite editor:
setenv EDITOR vi
will cause vi to be used whenever a program needs to perform text editing.
If you want to define a short name for a particular directory:
setenv PS $HOME/docs/postscript
allows you subsequently to refer to the subdirectory called postscript as $PS