You get an interactive login shell. But don't take it for granted, check it yourself.
This tells you that you have a login shell (from man bash
):
# shopt | grep login
login_shell on
This tells you that you have an interactive shell, look for the i
(from man bash
):
# echo $-
himBH
The interactive login shell you get has read /etc/profile
and than one of ~/.bash_profile
, ~/.bash_login
and ~/.profile
, as explained in man bash
:
When bash is invoked as an interactive login shell, or as a
non-interactive shell with the --login option, it first reads and
executes commands from the file
/etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that
order, and reads and executes com‐
mands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior.
Thanks for the writeup. Been confused on that since the beginning of time – Tyler DeWitt – 2012-09-26T14:33:51.757