PS1 does not update hostname in virtual instanceChanging behavior of bash prompt when functioning as rootNeed help with MPV bash scriptScript in ~/.bashrc works when manually executed, but not otherwiseGit branch name in bash shell don't disappear on non git directoriesMove and rename files that have no name extensionPrompt doesn't update git branchDelete first words from all folder names in directoryWrapping lines bugs when trying to colour terminal PS1 (even when escaping non printing caracters)

Why is coffee provided during big chess events when it contains a banned substance?

Island of Knights, Knaves, Spies

Making part of lines layer transparent based on circle

How can I cut a metal pipe while preserving the wires inside?

The colors in Resident Evil 7 are *completely* off

d-Menthol vs dl-menthol: Does an enantiomer and its racemic mixture have different melting points?

Congruence of angles axiom

How can I find out a substance name based on its structural formula?

Connect Mac CD drive to another Mac

Match the blocks

Can the bass be used instead of drums?

Having trouble with accidentals - Note-for-note vs traditional?

Will the size of Bitcoin core full-node be too big to run on a normal computer?

Diamondize Some Text

Rationalism and Catholicism / Protestantism

Map from a classifying space to a stack

Can digital computers understand infinity?

What's the current zodiac?

I didn't do any exit passport control when leaving Japan. What should I do?

Why does English employ double possessive pronouns such as theirs and ours?

How to respond when insulted by a grad student in a different department?

How much income am I getting by renting my house?

String Operation to Split on Punctuation

How to handle shared mortgage payment if one person can't pay their share?



PS1 does not update hostname in virtual instance


Changing behavior of bash prompt when functioning as rootNeed help with MPV bash scriptScript in ~/.bashrc works when manually executed, but not otherwiseGit branch name in bash shell don't disappear on non git directoriesMove and rename files that have no name extensionPrompt doesn't update git branchDelete first words from all folder names in directoryWrapping lines bugs when trying to colour terminal PS1 (even when escaping non printing caracters)






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









0

















I'm currently working on a virtual instance called virtual4.1. I changed PS1 in my bash script to color the current directory that I'm in. However, running source ~/.bashrc changes the instance hostname from virtual4.1 to a bunch of numbers and letters. Is is possible to keep the original virtual hostname without having the terminal default to something else? This is what I have for PS1:



PS1='[u@h e[1;34mWe[0m]$ '









share|improve this question


































    0

















    I'm currently working on a virtual instance called virtual4.1. I changed PS1 in my bash script to color the current directory that I'm in. However, running source ~/.bashrc changes the instance hostname from virtual4.1 to a bunch of numbers and letters. Is is possible to keep the original virtual hostname without having the terminal default to something else? This is what I have for PS1:



    PS1='[u@h e[1;34mWe[0m]$ '









    share|improve this question






























      0












      0








      0








      I'm currently working on a virtual instance called virtual4.1. I changed PS1 in my bash script to color the current directory that I'm in. However, running source ~/.bashrc changes the instance hostname from virtual4.1 to a bunch of numbers and letters. Is is possible to keep the original virtual hostname without having the terminal default to something else? This is what I have for PS1:



      PS1='[u@h e[1;34mWe[0m]$ '









      share|improve this question
















      I'm currently working on a virtual instance called virtual4.1. I changed PS1 in my bash script to color the current directory that I'm in. However, running source ~/.bashrc changes the instance hostname from virtual4.1 to a bunch of numbers and letters. Is is possible to keep the original virtual hostname without having the terminal default to something else? This is what I have for PS1:



      PS1='[u@h e[1;34mWe[0m]$ '






      command-line bash ps1






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question



      share|improve this question








      edited May 2 at 19:00







      Kevin Jiang

















      asked May 2 at 18:54









      Kevin JiangKevin Jiang

      12 bronze badges




      12 bronze badges























          0






          active

          oldest

          votes













          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',
          autoActivateHeartbeat: false,
          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/4.0/"u003ecc by-sa 4.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%2f1140057%2fps1-does-not-update-hostname-in-virtual-instance%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown


























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded















































          Thanks for contributing an answer to Ask Ubuntu!


          • 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%2faskubuntu.com%2fquestions%2f1140057%2fps1-does-not-update-hostname-in-virtual-instance%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

          Tamil (spriik) Luke uk diar | Nawigatjuun

          Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

          Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?