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!

injector
  • 930
  • 2
  • 7
  • 14

1 Answers1

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).

Richie086
  • 5,152
  • 12
  • 42
  • 65
  • 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 '14 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 '14 at 21:00
  • 1
    Close the terminal and open a new instance to see the changes! – gabrieloshiro Mar 07 '16 at 15:17