Editing a .profile file

To set an environment variable in the .profile file, you need to edit the file with an AIX editor. See What restrictions apply? for information about restrictions.

This example shows how to set the PDPRINTER environment variable in your .profile file, using the vi editor.

  1. Enter this command to change to your home directory:
  2. Enter this command:
    vi .profile
  3. A typical .profile file contains lines similar to these:
    export PATH
    export EDITOR=vi
  4. Insert or modify this line in the .profile file:
    export PDPRINTER=LogicalDestinationName
    where LogicalDestinationName is the name of the logical printer you want to set as your default.
  5. Save the change in plain text format and exit from the editor.
  6. Make the change effective by entering this command:
    . .profile
  7. Verify the change by entering the command:
    echo $PDPRINTER

    The logical printer name you entered displays.