You are on page 1of 1

AIX: User Profile (environment )

System startup files

When you log in, the shell defines your user environment after reading the initialization files that
you have set up. The characteristics of your user environment are defined by the values given to
your environment variables. You maintain this environment until you log out of the system.

The shell uses two types of profile files when you log in to the operating system. It evaluates the
commands contained in the files and then executes the commands to set up your system
environment. The files have similar functions, except that the /etc/profile file controls profile
variables for all users on a system, whereas the .profile file allows you to customize your own
environment.

The shell first runs the commands to set up your system environment in the /etc/environment file
and then evaluates the commands contained in the /etc/profile file. After these files are run, the
system then checks to see if you have a .profile file in your home directory. If the .profile file
exists, the system runs this file. The .profile file will specify if an environment file also exists. If an
environment file exists (usually named .env), the system then runs this file and sets up your
environment variables.

The /etc/environment, /etc/profile, and .profile files are run once at login time. The .env file, on the
other hand, is run every time you open a new shell or a window.

/etc/environment file
The first file that the operating system uses at login time is the /etc/environment file. The
/etc/environment file contains variables specifying the basic environment for all processes.

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

.profile file
The .profile file is present in your home ($HOME) directory and lets you customize your individual
working environment.

.env file
A fourth file that the operating system uses at login time is the .env file, if your .profile contains
the following line: export ENV=$HOME/.env

Solaris: User Profile ( environment )

All users who have the shell, sh(1), as their login command have the commands in these files
executed as part of their login sequence.

/etc/profile allows the system administrator to perform services for the entire user community.
Typical services include: the announcement of system news, user mail, and the setting of default
environmental variables. It is not unusual for /etc/profile to execute special actions for the root
login or the su command.

You might also like