docs: update mDNS reload instructions (#20955)

Signed-off-by: Imran Pochi <imranpochi@microsoft.com>
pull/20988/head
Imran Pochi 2025-06-25 11:17:03 -07:00 committed by GitHub
parent 21d0a4d2a2
commit 12752de516
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 0 deletions

View File

@ -291,10 +291,24 @@ Do not use .local as this is a reserved TLD for mDNS and bind9 DNS servers
#### mDNS reloading
Each time a file is created or a change is made to a file in `/etc/resolver` you may need to run the following to reload Mac OS mDNS resolver.
For macOS versions prior to Big Sur, you can reload the mDNS resolver using the following legacy commands:
```bash
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
```
However, if you're using a newer macOS version (Big Sur and beyond), running the legacy commands may result in the following error:
```bash
Load failed: 5: Input/output error
Try running `launchctl bootstrap` as root for richer errors.
```
In this case, the recommended approach is to use the following commands instead:
```bash
sudo launchctl enable system/com.apple.mDNSResponder.reloaded
sudo launchctl disable system/com.apple.mDNSResponder.reloaded
```
## TODO
- Add a service that runs on the host OS which will update the files in `/etc/resolver` automatically