When you share files and other services from your Mac on the local network, the systems on the network will use your computer's name to distinguish it from others that are available. In general, computers usually have unique names, but if the system detects the name is already in use then it will dynamically assign a sequential number to itself so network services may still be used. For example, if you purchase a new computer and call it "My Mac" similar to your old one, then it will rename itself "My Mac (2)" and appear as such on the local network.
This renaming allows the system's shared services to be used in the event of a naming conflict, but sometimes it may occur without any apparent reason, and at times even continue changing the number appended to the computer name. When this happens, you can edit you computer name in the sharing system preferences, but you may see an alert stating the name is already in use with the system reverting back to numbering the name.
If this happens to your system, then you can try tackling it in a few ways:
- Use only one network port
Often this problem happens when you have sharing services enabled and are using two active ports such as Wi-Fi and Ethernet that are linked to the same network. When this happens the system may detect the two connections as individual machines that have the same name, and then try renaming the machine accordingly. By only using one active network port at a time for any given network, you can avoid this problem.
If you regularly use multiple network ports, then try setting up a new location configuration for each in your Network system preferences, and then switch between them using the Location submenu in the Apple menu when you are at different networks.
- Turn off Back to My Mac and Find My Mac services
Apple's iCloud services for accessing your Mac from remote locations may present it as being available to your computer with the same name, which may happen if you have two network ports (ie, Wi-Fi and Ethernet) with active Internet connections on two different networks. By turning off these services, the system will not try to contact itself and present a naming conflict.
- Turn off other sharing services
Since the naming conflicts happen when sharing services broadcast their availability on the network, you can try troubleshooting computer renaming by turning off all of your shared services for the computer. Go to the sharing system preferences and uncheck all of the services listed, and then try reverting any automatic changes to your computer name. In addition to disabling these services, be sure to include Back to My Mac in the iCloud system preferences.
- Reset your router
Part of the problem for some users may be the home router's configuration. Information about your computer, including your network adapter's MAC address and computer name, may be stored in your router to make IP address assignment and other network services easier. Try not only unplugging and plugging the router back in, but also try fully resetting it to factory defaults to be sure all routing tables and other settings are cleared.
- Reset local port configurations
In addition to router settings that store information about your computer, your computer itself may have some rogue setting files that might be causing the naming conflicts. These files are located in the /Macintosh HD/Library/Preferences/SystemConfiguration/ folder. First try removing the file called "preferences.plist," which is used to store the computer's name and changes you make to it, but also try removing the following other plist files to have the system recreate them from default settings:
While you can remove the other preferences in this folder to have them be recreated from default settings, they are likely not associated with system renaming conflicts. Do keep in mind that by removing these files you will need to set up your network configurations again, including re-establishing favorite Wi-Fi networks.
- Run a general maintenance routine
Some of the system's network settings use caches to manage their settings and connections, which similar to the temporary settings in a router if corrupted may result in odd behavior that can impact network performance and function. To clear these caches and other temporary files, you can run a general maintenance routine on your system.
Questions? Comments? Have a fix? Post them below or
Be sure to check us out on Twitter and the CNET Mac forums.