I know there are rules of classification to explain this like the image below.
loading rules of profiles chain
But in my tests, it seems like it belong to none of them that if I run into another shell inside a normal shell.
userName is in ZSH $: echo thanks to anwsers & bash thanks to anwsers (scripts in /etc/profile didn't run) userName is in Bash $:
This has nothing to do with
bash being executed from
bash with no options starts a non-login shell, while
/etc/profile is only sourced by login shells. If you explicitly request a login shell with
bash -l, it will source