Sets the user environment at login time.
The $HOME/.profile file contains commands that the system executes when you log in. The .profile also provides variable profile assignments that the system sets and exports into the environment. The /etc/profile file contains commands run by all users at login.
After the login program adds the LOGNAME (login name) and HOME (login directory) variables to the environment, the commands in the $HOME/.profile file are executed, if the file is present. The .profile file contains the individual user profile that overrides the variables set in the profile file and customizes the user-environment profile variables set in the /etc/profile file. The .profile file is often used to set exported environment variables and terminal modes. The person who customizes the system can use the mkuser command to set default .profile files in each user home directory. Users can tailor their environment as desired by modifying their .profile file.
Note: The $HOME/.profile file is used to set environments for the Bourne and Korn shells. An equivalent environment for the C shell is the $HOME/.cshrc file.
The following example is typical of an /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=/usr/bin:/usr/sbin:/etc:: #Set terminal type TERM=lft #Make some environment variables global export MAIL PATH TERM
This file is part of Base Operating System (BOS) Runtime.
|/etc/profile||Contains profile variables.|
The bsh command, csh command, env command, login command, mail command, mkuser command, ksh command, stty command, su command.
The Profiles Overview in AIX 5L Version 5.1 System Management Concepts: Operating System and Devices discusses profiles and how they can be modified for individual needs.
The Shells Overview in AIX 5L Version 5.1 System User's Guide: Operating System and Devices describes what shells are, the different types, and how they affect the way commands are interpreted.