Search code examples
linuxbashmacos-sierra

My Mac's name in terminal is off


apples-MacBook-Pro:Desktop Parth$
Why does it say apples-MacBook-Pro here? Shouldn't it say Parths-MacBook-Pro since my account name is Parth?
Is this correct or my system prefs are wrong? Just curious!
Edit:
Recently my Mac was formatted and after that the service sender guys created an account whose name was apple
I did add a new account with name Parth but still it shows apples-MacBook-Pro!! I checked and before the formatting it used to say Parts-MacBook-Pro: Please see this image to know what I mean!


Solution

  • That is your computer/Mac hostname

    You could change it by going to System Preferences -> Sharing In the Computer Name settings, press the Edit Button

    For further control that text at terminal. It is about setting the environment variable PS1

    You could check your current PS1 value by running the command echo $PS1

    Here is the reference about how and what could you set to your PS1

    http://www.linuxnix.com/linuxunix-shell-ps1-prompt-explained-in-detail/