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

          Distance measures on a map of a game The 2019 Stack Overflow Developer Survey Results Are Inmin distance in a graphShortest distance path on contour plotHow to plot a tilted map?Finding points outside of a diskDelaunay link distanceAnnulus from GeoDisks: drawing a ring on a mapNegative Correlation DistanceFind distance along a path (GPS coordinates)Finding position at given distance in a GeoPathMathematics behind distance estimation using camera

          Genealogie vun de Merowenger Vum Merowech bis zum Chilperich I. | Navigatiounsmenü

          How to get a smooth, uniform ParametricPlot of a 2D Region?How to plot a complicated Region?How to exclude a region from ParametricPlotHow discretize a region placing vertices on a specific non-uniform gridHow to transform a Plot or a ParametricPlot into a RegionHow can I get a smooth plot of a bounded region?Smooth ParametricPlot3D with RegionFunction?Smooth border of a region ParametricPlotSmooth region boundarySmooth region plot from list of pointsGet minimum y of a certain x in a region