/etc/profile file

The second file that the operating system uses at login time is the /etc/profile file.

The /etc/profile file controls system-wide default variables, such as:

  • Export variables
  • File creation mask (umask)
  • Terminal types
  • Mail messages to indicate when new mail has arrived

The system administrator configures the /etc/profile file for all users on the system. Only the system administrator can change this file.

The following example is a typical /etc/profile file:

#Set file creation mask
umask 022
#Tell me when new mail arrives
MAIL=/usr/mail/$LOGNAME
#Add my /bin directory to the shell search sequence
PATH=/usr/bin:/usr/sbin:/etc::
#Set terminal type
TERM=lft
#Make some environment variables global
export MAIL PATH TERM

For detailed information about the /etc/profile file, see the Files Reference .