Thursday, August 4, 2011

/etc/environment : AIX - User administration related files

The /etc/environment file contains variables specifying the basic environment for all processes. When a new process begins, the exec subroutine makes an array of strings available that have the form Name=Value. This array of strings is called the environment. Each name defined by one of the strings is called an environment variable or shell variable. Environment variables are examined when a command starts running.

The /etc/environment file is not a shell script. It should only contain data in Name=Value format, and should not contain shell commands. Trying to run commands from this file may cause failure of the initialization process.

When you log in, the system sets environment variables from the environment file before reading your login profile, .profile. Following are a few variables that make up part of the basic environment.

HOME The full path name of the user login or HOME directory. The login program sets this to the directory specified in the /etc/passwd file.

LANG The locale name currently in effect. The LANG variable is set in the /etc/environment file at installation time.

NLSPATH The full path name for message catalogs.

PATH The sequence of directories that commands, such as sh, time,
nice, and nohup search when looking for a command whose path
name is incomplete. The directory names are separated by colons.

LPDEST The printer to use when a print-related command does not specify a destination printer.

TERM The terminal type.

EDITOR The default editor to be used by various commands that perform editing functions, such as crontab.

TZ The time zone information. The TZ environment variable is set by the /etc/environment file.

Attention:
Changing the time zone only affects processes that begin after the change is made. The init process only reads /etc/environment at startup, therefore init and its child processes will not be aware of a change to TZ until the system is rebooted.

No comments:

Post a Comment