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

May 24, 2015 7:17 PM in response to farquaad

Oh bat crap II. It's back!


Or rather, I contend it never went away, really.


I was tired of my iMac going to sleep and losing network connectivity, and I believe since I ticked off the box Wake for network access, this nasty bug has returned, and my computer is now named Mac (2).


So, stopped one problem (Mac now stays connected). Created another (Mac gets a name suffix). Brilliant.


This was never an issue in Mavericks! This is progress?

Jul 20, 2015 9:20 AM in response to Gary Stein

This also is happening to me in 10.10.4.


I somehow fixed it a couple years ago after much digging around and terminal messing (copying from other sites because I have very little knowledge there). I wish I'd written it down! I just got an SSD and did a clean install and now I'm seeing the dreaded "already in use" message.


If using wifi and ethernet at the same time contributes to this issue: ridiculous. I use ethernet because it's fast and I use wifi to sync my devices, play to Apple TV and sync my password manager. I don't normally leave wifi on all the time but if I do it shouldn't cause a network issue. I would imagine many people use ethernet and wifi for these same reasons.


It was cute and sweet though how people in this thread kept thinking new software updates would fix the problem. Apple doesn't fix software problems anymore. Apple just moves on to the next software release date. I'd also read big promises about fixing the dns issues with 10.10.4 but probably too much to ask that Apple might fix this six year old "already in use" bug.

Oct 11, 2015 2:04 AM in response to farquaad

Wonderful! I had thought I was dumb and was the only one with the problem because I was doing something wrongly. Your instructions were so clear and easy to follow, and sorted things out for me. Thank you.


My problems appeared to start when I recently bought and used a Seagate 1TB wireless plus hard drive. I am really pleased with it because now it is like having an iPad with 1TB. It works both in wireless and usb modes.


But it seemed that every time the Seagate joined the network, my two iMacs and my emac had the problem incrementing their names by one. I did not ever originally have have any digits in their names. They were simply called "Older iMac" which is on OS 10.5.8, "Newimac" which is on OS 10.11 and an old emac. So the problem cannot be one introduced since installing Yosemite, since the emac and older iMac have had the problem. My wife and I each have an iPad - but these we do call iPad 1 and iPad 2. But oddly these names did not change, although the iMacs and emacs did! I had already two other external hard drives but they were not wireless but USB. They had never caused this problem. So in my simple mind it seems as though the wireless aspect of the Seagate in some ways is causing the problem.


I am definitely not a computer buff but a wrinkled septuagenarian user. But the info I have given may help in solving a problem affecting many people.


Peter

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.