Announcement: Upgrade to macOS Mojave

With features like Dark Mode, Stacks, and four new built-in apps, macOS Mojave helps you get more out of every click. 
Find out how to upgrade to macOS Mojave >

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


Question: macOS keeps changing computer name

I've got a popup about there being two computer with the same name on the network.

The OS then change the name to (2), (3), etc.

I know for sure that there's not two computer with the same name on the network.

What can I do?

MacBook Air (13-inch, Early 2014), macOS High Sierra (10.13.1)

Posted on

Question marked as Helpful

Dec 22, 2017 12:19 PM in response to zappe In response to zappe

You need to precede the "set" option with two dashes, not one...

sudo scutil --set computername "xxx"

Do a "man scutil" in a Terminal window if you want to see more details about "scutil" command.

Also, you can try to see what the network looks like by using the "netstat -rn" (to see an IP address list) or "netstat -r" (to see a hostname list) Terminal command. You will see a list of all the known network devices and interfaces - you might even learn what might be conflicting with your existing computer. If you do use the "netstat -r" command, it might take a while to resolve all IP addresses to their actual hostname, so be patient (the "netstat -rn" always will return much faster since no hostname lookups are involved, which can take a while for networks with lots of attached devices).

Good luck...

There’s more to the conversation

Read all replies

Dec 12, 2017 3:40 PM in response to zappe In response to zappe

I would check them all just in case. I have the same problem when I am cloning from my iMac to my MacBook and forget to change the computer name. It's pretty common problem in home networks with multiple computers on the local network.

Dec 12, 2017 3:40 PM

Reply Helpful

Dec 12, 2017 4:59 PM in response to zappe In response to zappe

You will get that error message when you have two machines competing for the same IP address on the same LAN segment. Watch out for overlapping DHCP address ranges on different Macs, or statically assigned IP addresses that fall inside those same address ranges.

Dec 12, 2017 4:59 PM

Reply Helpful

Dec 20, 2017 12:15 PM in response to zappe In response to zappe

Usual reason I've encountered for that arising on current versions of macOS is a loop somewhere in the local network topology; where the problematic system can "see" itself via additional network paths. That's usually an incorrectly-configured network such as some wired and Wi-Fi connections, or multiple local network connections.

What's the local network configuration look like? Routers, switches, Wi-Fi devices, wired connections, etc. If there's both wired and wireless, then that usually either needs to be reconfigured into separate IP subnets with an intervening router, or the Wi-Fi device(s) should be switched to its access point mode (if the Wi-Fi device supports that).

I've also occasionally seen this misbehavior with the Bonjour sleep proxies in years past, but whatever was wrong with that was seemingly fixed in some of the now-older Airport and Time Capsule firmware updates.

Dec 20, 2017 12:15 PM

Reply Helpful

Dec 20, 2017 2:10 PM in response to MrHoffman In response to MrHoffman

The local network is a router and wi-fi and wired devices.

Why does that need to be on separate subnets?

The actual name on the network though still seems to be the original one if I check the settings.User uploaded file

When I've googled around I found others with same issue, but earlier version of macOS

macos - Computer name keeps changing OSX 10.10 (14A389) - Ask Different

Dec 20, 2017 2:10 PM

Reply Helpful
User profile for user: zappe

Question: macOS keeps changing computer name