terminal shows MBP instead of MacbookPro

"sachinK@Sachins-MBP ~ %"


In the terminal it shows MBP I want it to be shown as MacbookPro, how can I?

MacBook Pro Apple Silicon

Posted on Nov 24, 2022 8:13 AM

Reply
Question marked as Top-ranking reply

Posted on Nov 24, 2022 8:28 AM

SachinKhamitkar wrote:

"sachinK@Sachins-MBP ~ %"

In the terminal it shows MBP I want it to be shown as MacbookPro, how can I?


You can change it to anything you want...


From the Terminal.app

return the default prompt (note the trailing empty space) copy&paste:

export PS1="%n@%m %1~ %# " 


ex. USER NAME@MacBook-Pro ~ %



changed this with:

export PS1="%m %1~ %# " 


New prompt ex: MacBook-Pro ~ %



Edit the command line to suit your needs.


ref: https://www.tweaking4all.com/software/macosx-software/customize-zsh-prompt/

if in doubt google search for more examples


ref: Terminal User Guide for Mac - Apple Support



Alternatively if it is just the machine name see >System Setting>Sharing >edit



3 replies
Question marked as Top-ranking reply

Nov 24, 2022 8:28 AM in response to SachinKhamitkar

SachinKhamitkar wrote:

"sachinK@Sachins-MBP ~ %"

In the terminal it shows MBP I want it to be shown as MacbookPro, how can I?


You can change it to anything you want...


From the Terminal.app

return the default prompt (note the trailing empty space) copy&paste:

export PS1="%n@%m %1~ %# " 


ex. USER NAME@MacBook-Pro ~ %



changed this with:

export PS1="%m %1~ %# " 


New prompt ex: MacBook-Pro ~ %



Edit the command line to suit your needs.


ref: https://www.tweaking4all.com/software/macosx-software/customize-zsh-prompt/

if in doubt google search for more examples


ref: Terminal User Guide for Mac - Apple Support



Alternatively if it is just the machine name see >System Setting>Sharing >edit



Nov 24, 2022 9:55 AM in response to SachinKhamitkar

CAUTION: one solution is to change the name of the Home Folder.

It is DANGEROUS to change the name of the Home folder. We see far too many users who attempted to change the name of the Home Folder, and instead ended up no longer able to log in, and unable to access their data again, ever.


If you feel compelled to have a different name on your home folder, create a NEW Admin Account with the name you like, log in with the new name and copy your files over from the old Account. I recommend you leave both for at least a week to see if you are missing anything before removing the old account.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

terminal shows MBP instead of MacbookPro

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.