- shell environment variables
- and user-defined variables.
Environment variables are used to make the environment settings for proper execution of shell commands. Most of these variables are initialized in some of the system setup files. When a user logs in, the system setup files (such as the
.profilefile) are executed and accomplish the initialization of those environment variables. Usually, the system administrator writes the system setup files to set up a common environment for all users of the system. The users, however, can customize their own shell environment by assigning different values to some or all of these variables in the setup file according to their demands.
When a command is executed as a child process of the login shell, a copy of environment variables is passed to it by the kernel.