question

jdmortondev avatar image
0 Votes"
jdmortondev asked kobulloc-MSFT edited

Azure prompt has wrong name

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
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

This has been difficult for me to track down as well. Looking at the Cloud Shell quickstart, the username is based on $User@Azure. I'm looking into ways that this can be updated.

https://docs.microsoft.com/en-us/azure/cloud-shell/quickstart

0 Votes 0 ·
kobulloc-MSFT avatar image
0 Votes"
kobulloc-MSFT answered kobulloc-MSFT commented

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:


image.png (84.1 KiB)
· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks! I appreciate the quick response!

0 Votes 0 ·

No worries! Happy to help!

0 Votes 0 ·

Oh, I guess that answered half the question (the prompt), but I can't seem to rename the home dir. I'm guessing that has to do with how I used my name when I first signed up for Azure (mumble years ago). Should I just file a support ticket to have that addressed?

0 Votes 0 ·
Show more comments
jdmortondev avatar image
0 Votes"
jdmortondev answered kobulloc-MSFT edited

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?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Sure thing. I'll message you directly.

0 Votes 0 ·