/etc/environment file
The first file that the operating system uses at login time is the /etc/environment file. 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. The exec subroutine allows the entire
environment to be set at one time.
When you log in, the system sets environment variables from the /etc/environment file before reading your login profile, named .profile. The following variables make up the basic environment:
Item | Description |
---|---|
HOME | The full path name of the user's login or HOME directory. The login program sets this to the name specified in the /etc/passwd file. |
LANG | The locale name currently in effect. The LANG variable is initially set in the /etc/profile file at installation time. |
NLSPATH | The full path name for message catalogs. |
LOCPATH | The full path name of the location of National Language Support tables. |
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. |
TZ | The time zone information. The TZ environment variable is initially set by the /etc/profile file, the system login profile. |
For detailed information about the /etc/environment file, see the Files Reference.