You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

My iMac's computer name keeps changing automatically after Yosemite upgrade

This started happening once I upgraded my iMac to Yosemite. It will add numbers to the name of my iMac.


Example: It starts off as say "My iMac"


Then a half day later, it changes to "My iMac (2)"


Then the next day it will be "My iMac (3)"


And if I open the Finder window, it will show "My iMac" and "My iMac (2)" under "Shared" but if you click on them, nothing happens.


When I go to System Preferences > Sharing the computer name will have the number there "My iMac (3)" and say it can be found as MyiMac-3.local


If I change it back to just "My iMac", the number process starts all over again. I even tried naming the iMac something it was never named before and the same process occurs with the adding of the numbers.


Anyone know how I can fix this?

iMac (21.5-inch, Late 2012), OS X Yosemite (10.10)

Posted on Oct 26, 2014 3:45 PM

Reply
Question marked as Top-ranking reply

Posted on Mar 20, 2017 4:06 PM

Boot into the Recovery Drive. Run Disk First Aid on your internal drive.


Boot into the Recovery Drive by holding down Command R when restarting.


Open Disk Utility

Run First Aid on your internal drive, Macintosh HD

Quit Disk Utility


MORE INFO:

https://support.apple.com/en-us/HT201314


========================================

Remove any accents, apostrophes or special characters in Computer Name.


Check to see if the Computer Name(as seen in the Sharing Preference Pane), Local Host Name and Host Name are the same. The Local Host Name and the Host Name, which is often it's fully qualified name if

on a company network (such as computer.example.com). Often these are identical but they can be different. More Info


Open the Terminal application in Applications/Utilities. Run these three

commands:


sudo scutil --get ComputerName

sudo scutil --get LocalHostName

sudo scutil --get HostName


If the names are different you can try changing using these commands. Copy/paste usually works, but you might need to type out the commands.


sudo scutil --set ComputerName "newname"

sudo scutil --set LocalHostName "newname"

sudo scutil --set HostName "newname"


Reference:

http://osxdaily.com/2012/10/24/set-the-hostname-computer-name-and-bonjour-name-s eparately-in-os-x/

http://stackoverflow.com/questions/40027067/cannot-resolve-local-hostname-after- upgrading-to-macos-sierra

http://osxdaily.com/2010/09/06/change-your-mac-hostname-via-terminal/

106 replies

My iMac's computer name keeps changing automatically after Yosemite upgrade

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