20

I'm new to Mac. I would like to rename the computer name/root title that shows up when I open the terminal. Usually it's like computername:~ xxx$

Any and all help is appreciated!

1 Answer 1

33

try this in a terminal

sudo scutil --set HostName [NewHostNameHere]

Or if you want to do it via the GUI, do this

Apple Menu > System Preferences > Sharing > change the computer name (near the top of the window).

3
  • Thanks! That worked. I changed the hostname via the terminal. I confirmed by running the hostname command. However, the [computername:~ xxx$ ] has not changed.
    – injector
    Apr 16, 2014 at 20:28
  • 1
    did you try the 2nd method I listed? Also, you will need to open a new prompt in order to see the change or at least reload the terminal and it should show up.
    – Richie086
    Apr 16, 2014 at 21:00
  • 1
    Close the terminal and open a new instance to see the changes! Mar 7, 2016 at 15:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .