One advantage to using the optional script name ~/.bash_login, rather than ~/.profile, is that there is a parallel name for your logout script, ~/.bash_logout, if you decide to use it.
So if you're running Bash, rather than Bourne, this simplifies the configuration name set complexity from this:
/etc/profile # system login script
~/.bash_profile # user login script
~/.bash_logout # user logout script
/etc/bash.bashrc # system interactive script
~/.bashrc # user interactive script
to this:
/etc/profile # system login script
~/.bash_login # user login script <--sisters +
~/.bash_logout # user logout script <----------+
/etc/bash.bashrc # system interactive script
~/.bashrc # user interactive script
However, if you don't intend to use a logout script, this other way might be simpler for you:
/etc/profile # system login script
~/.bash_profile # user login script
/etc/bash.bashrc # system interactive script
~/.bashrc # user interactive script
Too bad there isn't more name symmetry in the config names...
But you might make this somewhat better with these symbolic links:
/etc/bash --> /etc/profile # system login script
~/.bash --> ~/.bash_profile # user login script
/etc/bashrc --> /etc/bash.bashrc # system interactive script
~/.bashrc # user interactive script
Non-destructively created with:
sudo ln -sT /etc/profile /etc/bash
ln -sT ~/.bash_profile ~/.bash
sudo ln -sT /etc/bash.bashrc /etc/bashrc
# ~/.bashrc (don't change)
Or you can get more aggressive and reverse this, and move the files to the new names, and instead back-link them:
sudo mv -f /etc/profile /etc/bash && \
sudo ln -sT /etc/bash /etc/profile
sudo mv -f /etc/bash.bashrc /etc/bashrc && \
sudo ln -sT /etc/bashrc /etc/bash.bashrc
mv -f ~/.bash_profile ~/.bash && \
ln -sT ~/.bash ~/.bash_profile
# ~/.bashrc (don't change)
Either way, now you have these more uniform config file names, easily found when you forget them from their links:
/etc/bash # system login config script
~/.bash # user login config script
/etc/bashrc # system interactive config script
~/.bashrc # user interactive config script
(I don't use a logout script, but it would probably be named: /etc/bash.logout .)
~/.bash_loginhelp with that~/.bash_loginexists at all. I mean, it functions exactly like~/.bash_profilein that only bash can read it, and it gets run when a login terminal is invoked. Other than the fact that~/.bash_loginruns only if there is no~/.bash_profile, there seems to be no different than the two, and that difference is completely useless. Why make a~/.bash_loginat all?