General

/etc/profile

/etc/profile initializes system-wide variables for login shells only.

/etc/profile should be sourced by all POSIX sh-compatible shells upon login: it sets up $PATH and other environment variables

.profile

The $HOME/.profile file is an individual user profile. The .profile was the original profile configuration for the Bourne shell (a.k.a., sh).

$HOME/.profile is not a part of the zsh startup files and is not sourced by zsh. $HOME/.profile can be sourced by Bourne-compatible shells (bash, ksh).

Bash

.bash_profile

.bash_profile is sourced in interactive login shells. Use .bash_profile to run commands that should run only once, such as customizing the $PATH environment variable.

.bashrc

.bashrc is sourced in interactive non-login shells. Put the commands that should run every time you launch a new shell in the .bashrc file. This include your aliases and functions, custom prompts, history customizations, and so on.

.bash_login

.bash_login is sourced in interactive login shells.

.bash_logout

When an interactive login shell exits, or a non-interactive login shell executes the exit builtin command, Bash reads and executes commands from the file .bash_logout, if it exists.

zsh

.zshenv

.zshenv' is sourced on all invocations of the shell, unless the -f option is set. It should contain commands to set the command search path, plus other important environment variables. .zshenv should not contain commands that produce output or assume the shell is attached to a tty.

.zprofile

.zprofile is similar to .zlogin, except that it is sourced before .zshrc.

.zshrc

.zshrc is sourced in interactive shells. It should contain commands to set up aliases, functions, options, key bindings, etc.

.zlogin

.zlogin is sourced in login shells. It should contain commands that should be executed only in login shells. .zlogin is not the place for alias definitions, options, environment variable settings, etc.; as a general rule, it should not change the shell environment at all. Rather, it should be used to set the terminal type and run a series of external commands (fortune, msgs, etc).

.zlogout

.zlogout is sourced when login shells exit.

Reference

Bash Startup Files

zsh Startup Files