First identify your shell, as noted in another answer this is simply done via the ps command ...
$ ps
PID TTY TIME CMD
3360 pts/2 00:00:00 bash
3702 pts/2 00:00:00 ps
To be sure which files are being read you will need to investigate the system which you are logging into. 'bash' shell has many 'if this' then 'do that' otherwise 'do something else' options. To see a full description of what files are sourced see here, but typically the list is ...
- /etc/profile
- $HOME/.bash_profile
- $HOME/.bashrc (if that is configured in the .bash_profile)
- $HOME/.bash_logout (on logout, not login)
For the bourne shell ('sh') it generally goes as follows when logging in
- /etc/profile
- $HOME/.profile
What I like to do on systems I am unfamiliar with is a line in any start up files I am expecting to be read that tests if the standard output is connected to a terminal, and if it is then display the file name. In this example I am using it in the .bash_profile file.
[ -t 1 ] && echo "reading .bash_profile"
This works for either bash or sh (and a few other derivatives as well). This helps because I know what is being read, when, and if I am getting errors I know which file they came from (errors before the first echoed message are likely from the login process itself, or from the system wide /etc/profile.
Also don't forget you can always create your own bespoke start up files and include them yourself by including them in a file which is already being sourced.