Editing the /etc/environment file

To set an environment variable in the /etc/environment file, you need to edit the file with an AIX editor. See How are environment variables set? and What restrictions apply? for additional information.

This example shows how to set the PDPRINTER environment variable in the /etc/environment file using the vi editor:

  1. Enter this command to change to the /etc directory:
    cd /etc
  2. Enter this command:
    vi environment

    A typical /etc/environment file contains lines similar to this:

    NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat
    LANG=en_US
     

  3. Insert or modify this line in the /etc/environment file:
    PDPRINTER=