Why would the PS1 export won't carry on to a sub process?












0















I changed PS1 value and then exported it but when I type bash to start a second process, PS1 doesn't appear changed there. How is this possible?



enter image description here



I ask since this sequence did work for me:



MESSAGE="Hi"
export MESSAGE
bash
echo $MESSAGE









share|improve this question




















  • 1





    Is PS1 changed in your startup file(s)? gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html

    – SiKing
    Sep 13 '16 at 16:36











  • Shell internal variables such as PS1 should not be exported, as something set for bash is incompatible with zsh. In the interactive configuration, set the appropriate PS1.

    – thrig
    Sep 13 '16 at 16:58











  • Thank thrig. Siking, I don't know; It's a fresh WSL install and I personally didn't make such a change.

    – JohnDoea
    Sep 13 '16 at 18:00
















0















I changed PS1 value and then exported it but when I type bash to start a second process, PS1 doesn't appear changed there. How is this possible?



enter image description here



I ask since this sequence did work for me:



MESSAGE="Hi"
export MESSAGE
bash
echo $MESSAGE









share|improve this question




















  • 1





    Is PS1 changed in your startup file(s)? gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html

    – SiKing
    Sep 13 '16 at 16:36











  • Shell internal variables such as PS1 should not be exported, as something set for bash is incompatible with zsh. In the interactive configuration, set the appropriate PS1.

    – thrig
    Sep 13 '16 at 16:58











  • Thank thrig. Siking, I don't know; It's a fresh WSL install and I personally didn't make such a change.

    – JohnDoea
    Sep 13 '16 at 18:00














0












0








0








I changed PS1 value and then exported it but when I type bash to start a second process, PS1 doesn't appear changed there. How is this possible?



enter image description here



I ask since this sequence did work for me:



MESSAGE="Hi"
export MESSAGE
bash
echo $MESSAGE









share|improve this question
















I changed PS1 value and then exported it but when I type bash to start a second process, PS1 doesn't appear changed there. How is this possible?



enter image description here



I ask since this sequence did work for me:



MESSAGE="Hi"
export MESSAGE
bash
echo $MESSAGE






bash






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 6 at 21:44









Rui F Ribeiro

39.5k1479132




39.5k1479132










asked Sep 13 '16 at 16:32









JohnDoeaJohnDoea

601132




601132








  • 1





    Is PS1 changed in your startup file(s)? gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html

    – SiKing
    Sep 13 '16 at 16:36











  • Shell internal variables such as PS1 should not be exported, as something set for bash is incompatible with zsh. In the interactive configuration, set the appropriate PS1.

    – thrig
    Sep 13 '16 at 16:58











  • Thank thrig. Siking, I don't know; It's a fresh WSL install and I personally didn't make such a change.

    – JohnDoea
    Sep 13 '16 at 18:00














  • 1





    Is PS1 changed in your startup file(s)? gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html

    – SiKing
    Sep 13 '16 at 16:36











  • Shell internal variables such as PS1 should not be exported, as something set for bash is incompatible with zsh. In the interactive configuration, set the appropriate PS1.

    – thrig
    Sep 13 '16 at 16:58











  • Thank thrig. Siking, I don't know; It's a fresh WSL install and I personally didn't make such a change.

    – JohnDoea
    Sep 13 '16 at 18:00








1




1





Is PS1 changed in your startup file(s)? gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html

– SiKing
Sep 13 '16 at 16:36





Is PS1 changed in your startup file(s)? gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html

– SiKing
Sep 13 '16 at 16:36













Shell internal variables such as PS1 should not be exported, as something set for bash is incompatible with zsh. In the interactive configuration, set the appropriate PS1.

– thrig
Sep 13 '16 at 16:58





Shell internal variables such as PS1 should not be exported, as something set for bash is incompatible with zsh. In the interactive configuration, set the appropriate PS1.

– thrig
Sep 13 '16 at 16:58













Thank thrig. Siking, I don't know; It's a fresh WSL install and I personally didn't make such a change.

– JohnDoea
Sep 13 '16 at 18:00





Thank thrig. Siking, I don't know; It's a fresh WSL install and I personally didn't make such a change.

– JohnDoea
Sep 13 '16 at 18:00










1 Answer
1






active

oldest

votes


















1














it is exported, but the ~/.bashrc or /etc/profile or ~/.bash_profile overwrite it without question. Run bash --norc instead of parameterless bash.






share|improve this answer

























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f309629%2fwhy-would-the-ps1-export-wont-carry-on-to-a-sub-process%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    it is exported, but the ~/.bashrc or /etc/profile or ~/.bash_profile overwrite it without question. Run bash --norc instead of parameterless bash.






    share|improve this answer






























      1














      it is exported, but the ~/.bashrc or /etc/profile or ~/.bash_profile overwrite it without question. Run bash --norc instead of parameterless bash.






      share|improve this answer




























        1












        1








        1







        it is exported, but the ~/.bashrc or /etc/profile or ~/.bash_profile overwrite it without question. Run bash --norc instead of parameterless bash.






        share|improve this answer















        it is exported, but the ~/.bashrc or /etc/profile or ~/.bash_profile overwrite it without question. Run bash --norc instead of parameterless bash.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Sep 13 '16 at 18:18

























        answered Sep 13 '16 at 16:37









        Ipor SircerIpor Sircer

        10.6k11024




        10.6k11024






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f309629%2fwhy-would-the-ps1-export-wont-carry-on-to-a-sub-process%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Morgemoulin

            Scott Moir

            Souastre