Picci
Picci

Reputation: 17762

Shell prompt keeps old local hostname in MacOs Catalina

I have just received a Mac with Catalina which belonged to a former colleague.

This colleague had set the local hostname as former-MB.local.

I have created a new account for me (whose name is myaccountname) and I have set the local hostname as myname-MB.local. I have also deleted the account of the previous colleague.

Now, when I open a terminal, I see thath the prompt is

myaccountname@former-MB ~ %

I have read the possibility to change the prompt of the shell setting it in ~/.zshrc (currently I do not have a ~/.zshrc file), but I am wondering if it is possible to remove the memory of former-MB local hostname, that apparently has been saved somewhere.

Upvotes: 1

Views: 765

Answers (1)

Picci
Picci

Reputation: 17762

Setting the desired hostname with the command sudo scutil —set NewName has solved the issue.

Upvotes: 1

Related Questions