Depends on the design of your shell.
Does it follow the POSIX standard?
If Yes, then your shell needs to read the ENV
environment variable at start of any interactive session and read/execute the content of the file(s) the ENV
variable refers. No other file needs to be read as per the standard. This is a bare minimum for POSIX conformation as far as reading files while starting is concerned.
What about customization?
The thing is, most of the shells nowadays use specific files to read/source/execute while starting a session. Files differ for various session types. For example, bash
sources the files /etc/profile
and one of ~/.bash_profile
, ~/.bash_login
, ~/.profile
(first one available following the order) while starting a login interactive session. Most popular shells do that too, but again this is a design decision, not a standard.