Best way to change your Mac's hostname everywhere - time machine, hosts file, bonjour, etc

This will probably be a multi-step process, but I want to change my new Macbook’s hostname everywhere it matters.

Here is my Macbooks’ current status

  • Migrated apps/setting from my iMac with a different hostname to it
  • Logged in for the first time
  • setup app first-time app permissions when prompted,
  • Time machine said backup drive changed, do I want to use it ( yes )
  • Did requested first-login application upgrades

Hostname checks:

  1. when I type “hostname” at the command prompt I get myfirstname-MBP.home in response
  2. cat /etc/hosts shows the name is the iMac’s name.
  3. Share screen shows name is myfirstnames-MacBook-Pro
  4. Time capsule named the backup bundle name as myfirstnames-MacBook-Pro.backupbundle
  5. Music -> My Account -> Managed devices doesn’t show any new devices, but I launched Music and shows my entire library from iTunes Match. I can also play my music so perhaps it thinks my Macbook is the same as my iMac ( which is listed in devices ).
  6. Appleid site - devices shows my Macbook in the list with the name myfirstnames-MacBook-Pro
  7. Backblaze - show the correct name. The reason is that backup was created with a computer that had the same name I’m changing my Macbook to

As you can tell , the names are all over the place. I have dozen computers on my home lan, so distinguishing them by using a consistent name across applications , files, etc is important if I want to keep myself from pulling all of my hair out.

What is the shortest path to get all of these name’s set to a different value and such that they are all the same name? I’ve already picked the name, but I don’t have a complete roadmap on how get the name changed in all of the locations that I mentioned.

This is a loaded post, which I why I used a numbered list to reference each item by. Should help.

Also note that the Macbook’s network connection is both wired and wireless at the same time. This has caused me problems with the Share Name as in the based where macOS will say the name is in use and autogenerate new names such as computer1 computer2 computer3 computer4…computerX. Irritating but bearable.

As I recall, the last time I changed the name of a Mac, all I did was edit the computer name in System Preferences/Sharing. After the Mac backed up to its Time Machine drive the TM directory name reflected the change. I never looked at the host file but after a cold boot the name on the Terminal prompt matched the new name. I can’t offer any info on Backblaze. I back up to B2 but use Arq.

I can’t even guess how many Macs I renamed in the past 20 years this way but I never had a problem. Very few of them, however, used Time Machine. I’ll be interested in reading the comments of others.

This is what I do also. Might take some time to propagate to other devices, but it works.

There’s a lot of discussion about this in this (admittedly dated) thread: