The current value will be reported on standard output. Supported preferences include: ComputerName The user-friendly name for the system. LocalHostName The local Bonjour host name.
Display the computer name or hostname on the login window-Mountain Lion
HostName The name associated with hostname 1 and gethostname 3. If the new value is not specified on the command line then it will be read from standard input.
John John 2, 1 1 gold badge 8 8 silver badges 2 2 bronze badges. Worked for me after running that command and rebooting Terminal.
How to Change a Mac's Name in Four Clicks | Smart Web Developer
This works for me, but upon rebooting, it then resets the hostname in the terminal back to what it was prior to me changing it. Works in Mojave. The terminal was showing emulator02 even though I changed it in settings -- or tried. I just ran all three supported preferences and restarted terminal; now I can get the hostname right. Hoover's tip , sudo scutil --set ComputerName "newname" sudo scutil --set LocalHostName "newname" sudo scutil --set HostName "newname" I would add these last two steps.
Danger14 Danger14 1, 2 2 gold badges 11 11 silver badges 13 13 bronze badges.
Change Your Mac’s Name on Lion or Snow Leopard
Restarting worked for me and 16 other people. Wouldn't hurt. Meaning it didn't work until you restarted? Restarting can hurt when you actually do serious work on your computer, and therefore have lots of applications open. Also, the fact that 16 people found some part of your answer helpful doesn't mean nothing worked until they restarted.
Worked for me without restarting, just quit Terminal completely and re-open. However, it told me that HostName was not set.
Thus, I just used sudo scutil --set in order to set HostName. I've already tried that See superuser. Reed Reed 4 4 bronze badges. Open System Preferences and click on Sharing. In the textbox labelled Computer Name: change it to whatever you want. Midwire Midwire 4 4 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. Choose Advanced Options from the pop-up menu that appears.
Edit the Account Name also known as the short name field Figure A to match the new name you gave the Home folder in the Users folder when you renamed it. Check your notes to confirm you have it correct; again, avoid using any spaces when spelling the name. Edit the Home Directory field to match the new name you provided the Home folder within the Users folder. Click OK and close System Preferences.
Restart the machine, log in using the renamed account, and verify the old Home Directory contents are present. Click the padlock icon found in the lower left corner of the window. Supply the administrator username and password to continue. Change the name that appears within the Full Name field. Review the name carefully for accuracy, and to avoid confusion, ensure the name doesn't match or too closely resemble a pre-existing account already present on the Mac. Whether you need iPhone and Mac tips or rundowns of enterprise-specific Apple news, we've got you covered.
Delivered Tuesdays. Erik Eckel owns and operates two technology companies.
As a managing partner with Louisville Geek, he works daily as an IT consultant to assist small businesses in overcoming technology challenges and maximizing IT investments. He is also president o