![]() ![]() ![]() I've observed this number to immediately be set to either (4) or (5) recently after using the scutil -set commands above. This is usually < 24 hours, but sometimes the ComputerName even changes immediately to have a suffixed number in parentheses (N). In my experience, setting the hostname this way, or through the standard System Preferences→Sharing→Computer Name only lasts a short period of time. Shut down and reset ALL networking hardware Sudo launchctl load -w /System/Library/LaunchDaemons/ ![]() Sudo launchctl unload -w /System/Library/LaunchDaemons/ # Check for mDNSResponder with: ps auxww | grep -i mDNSResponder # Check for discoveryd with: ps auxww | grep -i discoveryd Turn Bonjour off and back on # Yosemite (10.10) (and other versions with discoveryd?) Ensure you have only one connection to the local network.If you find that none of this is doing any good, there are some other reported solutions which include: Then, retry again to reset your computer name using above scutil commands. If this still did not work, try killing the mDNSResponder service: sudo killall -HUP mDNSResponder Sudo discoveryutil mdnsrestartregistrationsĪfter flushing mDNS cache, retry renaming your machine using the commands above. # check if you have discoveryutil command with: which discoveryutil # check if you have dscacheutil command with: which dscacheutil If this did not help, try flushing your mDNS cache: # El Capitan (10.11) and later You may also try forcing ComputerName back by using the System Preferences→Sharing→Computer Name text field preference. Once off, rename your machine using the commands above to finish. System Preferences→Energy Saver→Wake for Wi-Fi network access → Unchecked.If the Macbook keeps immediately renaming ComputerName back with a suffix, you may be able to make it stop by turning off Wake for Network Access. My_hostname='your-hostname-here' for key in LocalHostName ComputerName HostName do sudo scutil -set $key $my_hostname doneĪfter running this command, you can check that all places where they store hostname are the same with this one-liner:įor key in LocalHostName ComputerName HostName do sudo scutil -get $key done Like other users, I'm plagued by this annoyance but have found a semi-satisfactory workaround: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |