Macs have three names actually, and it tries (and sometimes fails) to keep them in sync. Latter OS versions seem to do better with this.
For the longest time I had my prompt in terminal declaring my new MBP a PBG4 after migrating my data and renaming my new computer.
There is the computer name, the sharing name, and the host name. After using Apple Remote Desktop to rename a computer, I push this to tidy up:
scutil --set HostName $(systemsetup -getcomputername | cut -c 16-99) This changes the sharing/AD name and the hostname to a simplified variation on the computer name.
The computer name can be longer than the share name, and can contain more characters than the share or the host name. (such as spaces) So the computer name is the "most complex" of the three, from which the other two are created. After renaming a computer's name in System Preferences, it should now automatically call sysctl to fix the other two. It didn't used to do that.
And yes, the startup disk is completely unrelated to the computer name.
Changing your computer name may affect:
- the name your computer binds to active directory using (you may get disconnected even though it says you are connected - in which case you need to disconnect and rejoin)
- any other computer that is connecting to yours via file sharing, ssh, or any other protocol (native or otherwise) that is connecting via your hostname
- any service that is identifying your computer by its name or hostname (such as time machine may)
- certain app DRM will mix your hostname into the salt (which often also include your ethernet MAC and your logic board's serial number) when creating your license file, causing it to fail to activate when launched. this may be transparently fixed when you get online, may require you to reactivate it, re-enter a serial number, or even given the vendor a call. some apps give you one or two freebies on renaming your computer, but then you have to call if you keep doing it. (certain versions of Quark) Some vendors recommend deactivating their software before you rename your computer, then reactivate it after you rename and reboot.
- lord knows what else. you may just end up discovering more things later, maybe much later.
Renaming your computer to the same name as another on your network will have mixed and often "undefined" behavior, meaning there can be a bit of randomness in the reaction, because they're not expecting that to happen and may really not have any good way to react. (what do you do when your unique identifier... is no longer unique?) That makes it "not recommended". If you rename a mac, it will verify the name is not in use on bonjour. If it is, it will tell you, and will rename your computer "My iMac (2)" or (3) etc. Stuff can get weird when it starts doing "My iMac (2) (2) (2)" which I have seen happen when the fallback is also in use. Things get worse with the HOSTNAME etc because their variety (and length) are restricted. AD limits length to 15 characters, so you can only add " (2)" so many times.
If you boot up a clone of your computer, (or plug it into the network) and it DISCOVERS it's not unique on the network, one mac or the other (somewhat randomly selected) will rename itself and will pop up an error. I've reimaged an entire lab and watched every monitor but one light up with that message as a result. In NO case will a mac rename itself back, the change is permanent until you decide to remove the " (2)" etc that it has added. It does NO remove the addition automatically when the conflict is resolved.http://cultivategrace.org/wp-content/uploads/2014/02/image2.jpg