I beg to differ. Typing "hostname" into the Terminal gets me Mac-Pro.local
That's because the "hostname" command tags-on the domain. But the domain is NOT part of the hostname.
To display the real hostname, use "hostname -s".
You can also see it in System Preferences, Sharing. It's at the top, "Computer Name".
If you hit edit, you will see the "local hostname", and can edit it. Here you will see the .local TLD, but note that you CANNOT remove .local - it's greyed out. This is because ".local" is NOT part of the computer name! They are just being helpful and showing you how to address the computer on your local subnet. i.e. you need to tag .local onto it.
Setting the host name without "local" using scutil as shown above will set the host name to....
... another drumroll....
exactly what it is currently!
It is indeed part of the host name.
No, it isn't. See above.
There does seem to be a lot of confusion about this. Lots of posts on the net asking for the opposite of this. That is, wanting to ADD .local to their hostname. Guess what happens if you try to add .local to your hostname? It gets removed. Otherwise it would be myhost.local.local
I'm assuming these people (wanting to ADD .local) are trying to access their computer from another computer that doesn't have a Bonjour/Zeroconf resolver installed, so doesn't know about the .local TLD. It's never correct to set a hostname with a .local suffix or to have a .local TLD in DNS. .local is reserved for Bonjour/Zeroconf.
---------- Post added at 03:32 PM ---------- Previous post was at 03:30 PM ----------
If the OP doesn't want to have to type the 'local' part of the hostname, then I suggest that the solution is to add 'local' to the search domain in /etc/resolv.conf.
A.
Yes, that's another way to do it.
To clarify, this would need to be done on every OTHER computer in the network. It's telling it "when I use a hostname without a suffix, automatically appened add ".local".