15.1 Initialization Files 
15.1.2 System wide initialization files
The primary system-wide initialization file is the profile file which is kept in the /etc directory. The /etc/profile file is created by default when the operating system is installed and can be edited and customized by a system administrator. When a Bourne or Korn shell user logs in, the system reads the /etc/profile file first, and then it reads the user's .profile file and, for Korn shell users, the .kshrc file. This means that the user's preferences for variable settings can override the default settings set and maintained by a system administrator in the /etc/profile file. The /etc/profile file performs the functions listed in the Figure. 
  • Exports Environment Variables - Makes environment variables available to subshells such as LOGNAME for login name.
  • Exports PATH for Default Command Path - The default path is a list of directories where the shell will look when a command is executed. Exporting it makes the list of directories available to all shells and subshells.
  • Sets TERM Variable Default Terminal Type - This defines the screen and keyboard characteristics of your workstation.
  • Displays Contents of /etc/motd File -The 'message of the day' file can be customized to display greetings or provide system information.
  • Sets Default File Creation Permissions - Sets umask values which determines the default permissions when a new file or directory is created.
  • Checks for Mail - Checks mail and will print a mail message upon login.