How to set shell prompt?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












My shell prompt appears to have changed. I am not sure what I did to cause it.



How it appears now:



bash-4.2$


How I want it to appear:



robinhood@ubuntu$









share|improve this question









New contributor




robinhoodjr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.























    up vote
    1
    down vote

    favorite












    My shell prompt appears to have changed. I am not sure what I did to cause it.



    How it appears now:



    bash-4.2$


    How I want it to appear:



    robinhood@ubuntu$









    share|improve this question









    New contributor




    robinhoodjr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      My shell prompt appears to have changed. I am not sure what I did to cause it.



      How it appears now:



      bash-4.2$


      How I want it to appear:



      robinhood@ubuntu$









      share|improve this question









      New contributor




      robinhoodjr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      My shell prompt appears to have changed. I am not sure what I did to cause it.



      How it appears now:



      bash-4.2$


      How I want it to appear:



      robinhood@ubuntu$






      bash prompt






      share|improve this question









      New contributor




      robinhoodjr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      robinhoodjr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 13 mins ago









      Jeff Schaller

      33.8k851113




      33.8k851113






      New contributor




      robinhoodjr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 36 mins ago









      robinhoodjr

      61




      61




      New contributor




      robinhoodjr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      robinhoodjr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      robinhoodjr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Prompt is configured by startup files, /etc/profile or per-user in ~/.profile or ~/.bashrc. The documentation explains which files are used depending on how bash is invoked.



          Ubuntu wiki has examples with default and custom prompts. You possibly want to restore the default Ubuntu prompt to ~/.bashrc (assuming it got deleted):



          if [ "$color_prompt" = yes ]; then
          PS1='$debian_chroot:+($debian_chroot)[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ '
          else
          PS1='$debian_chroot:+($debian_chroot)u@h:w$ '
          fi


          If you do not want current working directory in the prompt, remove w.






          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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );






            robinhoodjr is a new contributor. Be nice, and check out our Code of Conduct.









             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f474922%2fhow-to-set-shell-prompt%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            Prompt is configured by startup files, /etc/profile or per-user in ~/.profile or ~/.bashrc. The documentation explains which files are used depending on how bash is invoked.



            Ubuntu wiki has examples with default and custom prompts. You possibly want to restore the default Ubuntu prompt to ~/.bashrc (assuming it got deleted):



            if [ "$color_prompt" = yes ]; then
            PS1='$debian_chroot:+($debian_chroot)[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ '
            else
            PS1='$debian_chroot:+($debian_chroot)u@h:w$ '
            fi


            If you do not want current working directory in the prompt, remove w.






            share|improve this answer


























              up vote
              0
              down vote













              Prompt is configured by startup files, /etc/profile or per-user in ~/.profile or ~/.bashrc. The documentation explains which files are used depending on how bash is invoked.



              Ubuntu wiki has examples with default and custom prompts. You possibly want to restore the default Ubuntu prompt to ~/.bashrc (assuming it got deleted):



              if [ "$color_prompt" = yes ]; then
              PS1='$debian_chroot:+($debian_chroot)[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ '
              else
              PS1='$debian_chroot:+($debian_chroot)u@h:w$ '
              fi


              If you do not want current working directory in the prompt, remove w.






              share|improve this answer
























                up vote
                0
                down vote










                up vote
                0
                down vote









                Prompt is configured by startup files, /etc/profile or per-user in ~/.profile or ~/.bashrc. The documentation explains which files are used depending on how bash is invoked.



                Ubuntu wiki has examples with default and custom prompts. You possibly want to restore the default Ubuntu prompt to ~/.bashrc (assuming it got deleted):



                if [ "$color_prompt" = yes ]; then
                PS1='$debian_chroot:+($debian_chroot)[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ '
                else
                PS1='$debian_chroot:+($debian_chroot)u@h:w$ '
                fi


                If you do not want current working directory in the prompt, remove w.






                share|improve this answer














                Prompt is configured by startup files, /etc/profile or per-user in ~/.profile or ~/.bashrc. The documentation explains which files are used depending on how bash is invoked.



                Ubuntu wiki has examples with default and custom prompts. You possibly want to restore the default Ubuntu prompt to ~/.bashrc (assuming it got deleted):



                if [ "$color_prompt" = yes ]; then
                PS1='$debian_chroot:+($debian_chroot)[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ '
                else
                PS1='$debian_chroot:+($debian_chroot)u@h:w$ '
                fi


                If you do not want current working directory in the prompt, remove w.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 17 mins ago

























                answered 24 mins ago









                sebasth

                7,44631745




                7,44631745




















                    robinhoodjr is a new contributor. Be nice, and check out our Code of Conduct.









                     

                    draft saved


                    draft discarded


















                    robinhoodjr is a new contributor. Be nice, and check out our Code of Conduct.












                    robinhoodjr is a new contributor. Be nice, and check out our Code of Conduct.











                    robinhoodjr is a new contributor. Be nice, and check out our Code of Conduct.













                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f474922%2fhow-to-set-shell-prompt%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay