Different shells have different profile files, also referred to sometimes as startup files . We show here those for the Korn shell. There are usually four files for the customisation of the environment:
/etc/profile
$HOME/.profile
/etc/.kshrc
$HOME/.kshrc
Not all these files are used on all systems, some depend on the setting of
the ENV variable. See local documentation for the system being used.
If using HP VUE, there is a file $HOME/.vueprofile which is called instead of $HOME/.profile or $HOME/.login when a user logs in.
The files in the user's home directory are available for private customisation. The two other files are available for common customisation by the system manager to be used by all users on particular systems and can only be modified by the corresponding system manager. The file /etc/.kshrc will only be utilised if the ENV environment variable is set appropriately (see description above).
The C Shell executes three (hidden) files from the $HOME directory at various times in your session. They are
.login, .cshrc, and .logout.
When you log on, the .login file
located in your home directory is executed. You can specify the
type of terminal you are using and otherwise customize your
environment. It should include commands that you want to execute
once, at the beginning of each session, specifying such things
as terminal settings and environment variables. You can change the default
values, or create your own environment
variables using the set command to set C-shell variables.
Also, the C Shell executes the .cshrc file that is located in your home directory each time you invoke a new C Shell, as when you log on or execute a C Shell script or otherwise fork a new process. At login, it is executed before .login. It can be used to set variables and parameters that are local to a shell.
The C Shell executes the .logout file in your home directory when you log off the system. The following (.logout) file simply clears the screen:
clear
If you modify your .chsrc or .login commands and you want
them to take effect in the current session, you must execute them
with the source command:
source .cshrc
source .login
The following table summarises the profile files associated with each shell at login, logout and when a new shell is invoked.

(1) System-wide startup scripts are not available in most cases:
csh on Sun and DEC platforms starts no file under /etc (according to the
manpages)
csh on HP platforms starts the file /etc/csh.login at login time.
csh on SGI platforms starts the file /etc/cshrc then /etc/.login then
/etc/csh.cshrc then $HOME/.cshrc at interactive time and all those files plus
$HOME/.login at login time.
csh on IBM platforms starts the files /etc/csh.cshrc and /etc/csh.login at login
time and /etc/csh.cshrc at interactive time.
(2) Again there are some differences between platforms. Some Bourne shells need
to have a '-' character to start the profile files.
(3) ksh is not available on SunOS IV. Thus a link to zsh is provided.
(4) $ENV is the file pointed to by the value of the environment variable $ENV if it is set. It is usually set to .kshrc in the HOME directory.