How to change the command prompt color in BASH? [duplicate]












0
















This question already has an answer here:




  • How to set the command prompt's color in Bash?

    2 answers




I'd like to customize the color of just the command prompt of a BASH shell, while leaving the rest of the terminal using the default color scheme.



In example, I'm using one of the default color schemes that come with Konsole, "green on black", which, surprisingly enough, displays a green text over a black background.



Given the following example:



user@host:~> some command
output of some command
output of some command
output of some command
output of some command
output of some command
output of some command
output of some command
output of some command
user@host:~>


what should I do to make the terminal display only user@host:~> some command (or even just user@host:~> ) with a different color, let's say a light blue?



All of this in order to stand out more when the output occupies many lines, to make it more visible where the output starts and ends.










share|improve this question













marked as duplicate by slhck linux
Users with the  linux badge can single-handedly close linux questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 16 at 18:50


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.























    0
















    This question already has an answer here:




    • How to set the command prompt's color in Bash?

      2 answers




    I'd like to customize the color of just the command prompt of a BASH shell, while leaving the rest of the terminal using the default color scheme.



    In example, I'm using one of the default color schemes that come with Konsole, "green on black", which, surprisingly enough, displays a green text over a black background.



    Given the following example:



    user@host:~> some command
    output of some command
    output of some command
    output of some command
    output of some command
    output of some command
    output of some command
    output of some command
    output of some command
    user@host:~>


    what should I do to make the terminal display only user@host:~> some command (or even just user@host:~> ) with a different color, let's say a light blue?



    All of this in order to stand out more when the output occupies many lines, to make it more visible where the output starts and ends.










    share|improve this question













    marked as duplicate by slhck linux
    Users with the  linux badge can single-handedly close linux questions as duplicates and reopen them as needed.

    StackExchange.ready(function() {
    if (StackExchange.options.isMobile) return;

    $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
    var $hover = $(this).addClass('hover-bound'),
    $msg = $hover.siblings('.dupe-hammer-message');

    $hover.hover(
    function() {
    $hover.showInfoMessage('', {
    messageElement: $msg.clone().show(),
    transient: false,
    position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
    dismissable: false,
    relativeToBody: true
    });
    },
    function() {
    StackExchange.helpers.removeMessages();
    }
    );
    });
    });
    Jan 16 at 18:50


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





















      0












      0








      0









      This question already has an answer here:




      • How to set the command prompt's color in Bash?

        2 answers




      I'd like to customize the color of just the command prompt of a BASH shell, while leaving the rest of the terminal using the default color scheme.



      In example, I'm using one of the default color schemes that come with Konsole, "green on black", which, surprisingly enough, displays a green text over a black background.



      Given the following example:



      user@host:~> some command
      output of some command
      output of some command
      output of some command
      output of some command
      output of some command
      output of some command
      output of some command
      output of some command
      user@host:~>


      what should I do to make the terminal display only user@host:~> some command (or even just user@host:~> ) with a different color, let's say a light blue?



      All of this in order to stand out more when the output occupies many lines, to make it more visible where the output starts and ends.










      share|improve this question















      This question already has an answer here:




      • How to set the command prompt's color in Bash?

        2 answers




      I'd like to customize the color of just the command prompt of a BASH shell, while leaving the rest of the terminal using the default color scheme.



      In example, I'm using one of the default color schemes that come with Konsole, "green on black", which, surprisingly enough, displays a green text over a black background.



      Given the following example:



      user@host:~> some command
      output of some command
      output of some command
      output of some command
      output of some command
      output of some command
      output of some command
      output of some command
      output of some command
      user@host:~>


      what should I do to make the terminal display only user@host:~> some command (or even just user@host:~> ) with a different color, let's say a light blue?



      All of this in order to stand out more when the output occupies many lines, to make it more visible where the output starts and ends.





      This question already has an answer here:




      • How to set the command prompt's color in Bash?

        2 answers








      linux command-line bash terminal konsole






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 16 at 18:38









      SekhemtySekhemty

      3,951104481




      3,951104481




      marked as duplicate by slhck linux
      Users with the  linux badge can single-handedly close linux questions as duplicates and reopen them as needed.

      StackExchange.ready(function() {
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function() {
      $hover.showInfoMessage('', {
      messageElement: $msg.clone().show(),
      transient: false,
      position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
      dismissable: false,
      relativeToBody: true
      });
      },
      function() {
      StackExchange.helpers.removeMessages();
      }
      );
      });
      });
      Jan 16 at 18:50


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









      marked as duplicate by slhck linux
      Users with the  linux badge can single-handedly close linux questions as duplicates and reopen them as needed.

      StackExchange.ready(function() {
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function() {
      $hover.showInfoMessage('', {
      messageElement: $msg.clone().show(),
      transient: false,
      position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
      dismissable: false,
      relativeToBody: true
      });
      },
      function() {
      StackExchange.helpers.removeMessages();
      }
      );
      });
      });
      Jan 16 at 18:50


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Put this at the end of your ~/.bashrc



          export PS1="e[34mu@h:~> e[36m"





          share|improve this answer






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Put this at the end of your ~/.bashrc



            export PS1="e[34mu@h:~> e[36m"





            share|improve this answer




























              0














              Put this at the end of your ~/.bashrc



              export PS1="e[34mu@h:~> e[36m"





              share|improve this answer


























                0












                0








                0







                Put this at the end of your ~/.bashrc



                export PS1="e[34mu@h:~> e[36m"





                share|improve this answer













                Put this at the end of your ~/.bashrc



                export PS1="e[34mu@h:~> e[36m"






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 16 at 18:48









                user1330614user1330614

                1334




                1334















                    Popular posts from this blog

                    Сан-Квентин

                    8-я гвардейская общевойсковая армия

                    Алькесар