Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

what profiles chain will be loaded if I run a shell in another shell?

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 $:

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

This has nothing to do with bash being executed from zsh. 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 /etc/profile.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading