profile
Purpose
Sets the user environment at login time.
Description
The profile file contains commands to be executed at
login and variable assignments to be set and exported
into the environment. The /etc/profile file contains
commands executed by all users at login.
After the login program adds the LOGNAME (login name) and
HOME (login directory) parameters to the environment, the
commands in $HOME/.profile are executed, if it is
present. The .profile file is the individual user
profile that overrides the variables set in the profile
file and is used to tailor the user environment variables
set in /etc/profile. The .profile file is often used to
set exported environment variables and terminal modes.
The person who customizes the system can use adduser to
set default .profile files in each user home directory.
Users can tailor their environment as desired by modi-
fying their .profile file.
Example
The following example is typical of a /etc/profile file:
# Set file creation mask
unmask 022
# Tell me when new mail arrives
MAIL=/usr/mail/$LOGNAME
# Add my /bin directory to the shell search sequence
PATH=/bin:/usr/bin:/etc::
# Set terminal type
TERM=hft
# Make some environment variables global
export MAIL PATH TERM
Files
$HOME/.profile
/etc/profile
/etc/profile.dos
Related Information
In this book: "environment" and "TERM."
The env, login, mail, sh, stty, and su commands in AIX
Operating System Commands Reference.