Get rid of name and hostname in a terminal prompt











up vote
0
down vote

favorite












I use powerline-shell and my prompt looks like:



enter image description here.



How can I get rid of my name and hostname in the prompt?



I tried to search in .bashrc file for PS1 variables:



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


Which I have to edit to the goal?










share|improve this question


















  • 3




    Since you are using powerline-shell, which claims to provide "A beautiful and useful prompt for your shell [that is] easy to customize and extend", then I would venture that the answer to your question is in the powerline-shell documentation. It almost certainly won't help to change your bash prompt, as the whole point of prompt beautifiers is that they replace the bash prompt.
    – zwets
    Aug 7 at 22:13






  • 1




    Well the sequence for hostname would be h - so for example the default Ubuntu ~/.bashrc (copied from /etc/skel/.bashrc) includes u@h in its PS1 string - yours does not appear to do the same
    – steeldriver
    Aug 7 at 22:49

















up vote
0
down vote

favorite












I use powerline-shell and my prompt looks like:



enter image description here.



How can I get rid of my name and hostname in the prompt?



I tried to search in .bashrc file for PS1 variables:



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


Which I have to edit to the goal?










share|improve this question


















  • 3




    Since you are using powerline-shell, which claims to provide "A beautiful and useful prompt for your shell [that is] easy to customize and extend", then I would venture that the answer to your question is in the powerline-shell documentation. It almost certainly won't help to change your bash prompt, as the whole point of prompt beautifiers is that they replace the bash prompt.
    – zwets
    Aug 7 at 22:13






  • 1




    Well the sequence for hostname would be h - so for example the default Ubuntu ~/.bashrc (copied from /etc/skel/.bashrc) includes u@h in its PS1 string - yours does not appear to do the same
    – steeldriver
    Aug 7 at 22:49















up vote
0
down vote

favorite









up vote
0
down vote

favorite











I use powerline-shell and my prompt looks like:



enter image description here.



How can I get rid of my name and hostname in the prompt?



I tried to search in .bashrc file for PS1 variables:



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


Which I have to edit to the goal?










share|improve this question













I use powerline-shell and my prompt looks like:



enter image description here.



How can I get rid of my name and hostname in the prompt?



I tried to search in .bashrc file for PS1 variables:



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


Which I have to edit to the goal?







customization bashrc ps1 powerline-plugin






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Aug 7 at 22:00









Roma Karageorgievich

1013




1013








  • 3




    Since you are using powerline-shell, which claims to provide "A beautiful and useful prompt for your shell [that is] easy to customize and extend", then I would venture that the answer to your question is in the powerline-shell documentation. It almost certainly won't help to change your bash prompt, as the whole point of prompt beautifiers is that they replace the bash prompt.
    – zwets
    Aug 7 at 22:13






  • 1




    Well the sequence for hostname would be h - so for example the default Ubuntu ~/.bashrc (copied from /etc/skel/.bashrc) includes u@h in its PS1 string - yours does not appear to do the same
    – steeldriver
    Aug 7 at 22:49
















  • 3




    Since you are using powerline-shell, which claims to provide "A beautiful and useful prompt for your shell [that is] easy to customize and extend", then I would venture that the answer to your question is in the powerline-shell documentation. It almost certainly won't help to change your bash prompt, as the whole point of prompt beautifiers is that they replace the bash prompt.
    – zwets
    Aug 7 at 22:13






  • 1




    Well the sequence for hostname would be h - so for example the default Ubuntu ~/.bashrc (copied from /etc/skel/.bashrc) includes u@h in its PS1 string - yours does not appear to do the same
    – steeldriver
    Aug 7 at 22:49










3




3




Since you are using powerline-shell, which claims to provide "A beautiful and useful prompt for your shell [that is] easy to customize and extend", then I would venture that the answer to your question is in the powerline-shell documentation. It almost certainly won't help to change your bash prompt, as the whole point of prompt beautifiers is that they replace the bash prompt.
– zwets
Aug 7 at 22:13




Since you are using powerline-shell, which claims to provide "A beautiful and useful prompt for your shell [that is] easy to customize and extend", then I would venture that the answer to your question is in the powerline-shell documentation. It almost certainly won't help to change your bash prompt, as the whole point of prompt beautifiers is that they replace the bash prompt.
– zwets
Aug 7 at 22:13




1




1




Well the sequence for hostname would be h - so for example the default Ubuntu ~/.bashrc (copied from /etc/skel/.bashrc) includes u@h in its PS1 string - yours does not appear to do the same
– steeldriver
Aug 7 at 22:49






Well the sequence for hostname would be h - so for example the default Ubuntu ~/.bashrc (copied from /etc/skel/.bashrc) includes u@h in its PS1 string - yours does not appear to do the same
– steeldriver
Aug 7 at 22:49












1 Answer
1






active

oldest

votes

















up vote
0
down vote













You need to change this in your powerline config file which is normally located under ~/.config/powerline-shell/config.json.



If you haven't one yet you can create one using the following commands:



mkdir -p ~/.config/powerline-shell
powerline-shell --generate-config > ~/.config/powerline-shell/config.json


Then simply remove the segments you dont want like username or hostname.
For more information see the docs






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    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: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    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%2faskubuntu.com%2fquestions%2f1063344%2fget-rid-of-name-and-hostname-in-a-terminal-prompt%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








    up vote
    0
    down vote













    You need to change this in your powerline config file which is normally located under ~/.config/powerline-shell/config.json.



    If you haven't one yet you can create one using the following commands:



    mkdir -p ~/.config/powerline-shell
    powerline-shell --generate-config > ~/.config/powerline-shell/config.json


    Then simply remove the segments you dont want like username or hostname.
    For more information see the docs






    share|improve this answer

























      up vote
      0
      down vote













      You need to change this in your powerline config file which is normally located under ~/.config/powerline-shell/config.json.



      If you haven't one yet you can create one using the following commands:



      mkdir -p ~/.config/powerline-shell
      powerline-shell --generate-config > ~/.config/powerline-shell/config.json


      Then simply remove the segments you dont want like username or hostname.
      For more information see the docs






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        You need to change this in your powerline config file which is normally located under ~/.config/powerline-shell/config.json.



        If you haven't one yet you can create one using the following commands:



        mkdir -p ~/.config/powerline-shell
        powerline-shell --generate-config > ~/.config/powerline-shell/config.json


        Then simply remove the segments you dont want like username or hostname.
        For more information see the docs






        share|improve this answer












        You need to change this in your powerline config file which is normally located under ~/.config/powerline-shell/config.json.



        If you haven't one yet you can create one using the following commands:



        mkdir -p ~/.config/powerline-shell
        powerline-shell --generate-config > ~/.config/powerline-shell/config.json


        Then simply remove the segments you dont want like username or hostname.
        For more information see the docs







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 18 at 18:04









        choise

        9817




        9817






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1063344%2fget-rid-of-name-and-hostname-in-a-terminal-prompt%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

            Quarter-circle Tiles

            build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

            Mont Emei