Azure prompt has wrong name

JD Morton 26 Reputation points
2021-06-20T00:57:07.047+00:00

This seems like it should be obvious, but I'm not having any luck. My name is incorrect in the Azure Cloud Shell, and I'm not sure what setting I need to fix it. The prompt shows:
david@Azure
and my home dir shows
/home/david

but David is my middle name, and I go by "JD", so my prompt should show
jd@Azure
and my home dir shows
/home/jd

What setting do I need to fix to correct this? (sorry about cruddy tag. I was expecting to find a CLI or Cloud Shell tag, but no luck)

Azure Blueprints
Azure Blueprints
An Azure service that provides templates for quick, repeatable creation of fully governed cloud subscriptions.
70 questions
{count} votes

Accepted answer
  1. kobulloc-MSFT 23,651 Reputation points Microsoft Employee
    2021-06-23T22:30:02.227+00:00

    It turns out that the Cloud Shell is a standard Ubuntu shell so all methods for modifying the prompt should work. Here are two examples based on the writeup from VITUX:

    Use an alternate name:

    PS1="MyNickname@Azure: "  
    

    More closely match default colors:

    PS1="\[\033[01;32m\]MyNickname@Azure\[\033[01;37m\]:~$ "  
    

    108747-image.png

    Additional resources:


1 additional answer

Sort by: Most helpful
  1. JD Morton 26 Reputation points
    2021-06-29T22:10:07.763+00:00

    Well, no luck. I could add some additional details for you, but I don't want to publicly post PII. Is there a way I can DM you?