Get this error: “The name of your computer is already in use on this network”

catalinaNetworkwifi

For 5 years now this bug has apparently persisted with each version of OS X. I'm now on Catalina 10.15.3 and a much newer Mac.

enter image description here

It is apparently WiFi related because disabling WiFi and using a wired connection doesn't result in the problem. It doesn't matter what I name it. This page made years ago claims to have the fix, this does not fix it at all. If I type hostname at the terminal I still get the proper name but it keeps changing the name that would appear on the network.

Is there any progress or fix on this front or will this always be a bug in Mac OS?

Best Answer

  1. Open a terminal.

  2. Type the following command to change the primary hostname of your Mac:

This is your fully qualified hostname, for example, myMac.domain.com

 sudo scutil --set HostName <new host name>
  1. Type the following command to change the Bonjour hostname of your Mac:

This is the name usable on the local network, for example myMac.local.

sudo scutil --set LocalHostName <new host name>
  1. If you also want to change the computer name, type the following command:

This is the user-friendly computer name you see in Finder, for example myMac.

 sudo scutil --set ComputerName <new name>
  1. Flush the DNS cache by typing:

    dscacheutil -flushcache
    
  2. Restart your Mac