Setting local environment variables for utilities

On UNIX™ operating systems, you can start certain utilities without setting local environment variables in your shell environment. You can set local environment variables in the onconfig file. When you run the command to start the utility, use the -FILE option to point to the onconfig file.

Before you begin

Before you begin, ensure that these prerequisites are met:

  • The path to the executable program for the utility is part of the existing shell environment.
  • If you want to run commands on a remote computer, a remote shell utility such as SSH is configured.

About this task

Procedure

  1. Add values for one or more environment variables to the onconfig file. Use the following format for each directive:
    #$variable_name value
  2. When you run the command to start the utility, use the -FILE option to specify the full or relative path to the onconfig file.
    Review the syntax, usage, and examples in the reference information for the -FILE option.

Results

The utility reads and sets the environment variables that are specified in the onconfig file, and those values take precedence over values that are set in the local shell environment.