I'm trying to get my El Capitan's (10.11.6) DNS cache to flush, to try and solve slow localhost domain name resolution, but nothing I do has any effect. My computer name, hostname and hard disk names used to be as follows:
Santa's MacBook Pro
santas-macbook-pro-2.local
Santa's MacBook
(I didn't choose to put the "-2" at the end of the hostname; that's what the Mac had in the Sharing preference pane.)
I tried editing the etc/hosts
file as follows:
127.0.0.1 localhost santas-macbook-pro-2.local
255.255.255.255 broadcasthost
::1 localhost santas-macbook-pro-2.local
fe80::1%lo0 localhost
but even after a restart the resolution was still as slow as ever.
Tried renaming the computer and hostname to trial
and trial.local
(updating etc/hosts
accordingly) and the hard disk to tt
. Got OnyX to flush various caches including system and kernel extensions, restarted, still slow.
In running the little inetTester I get Santa's MacBook Pro.local
returned.
I've tried flushing the DNS cache following the instructions here, restarted, and I still get Santa's MacBook Pro.local
returned.
It seems discoveryutil
doesn't exist any more (in any case it's not on my machine), so I can't even look at the contents of the cache.
What on earth do I have to do to get this machine to forget about being Santa's MacBook Pro?