Why do I get this error: "The name of your computer is already in use on this network"? 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. 



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?
Open a terminal.
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 &lt;new host name&gt;



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 &lt;new host name&gt;



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 &lt;new name&gt;



Flush the DNS cache by typing:

dscacheutil -flushcache

Restart your Mac