Skip to main content

Raymii.org Logo (IEC resistor symbol)logo

Quis custodiet ipsos custodes?
Home | About | All pages | RSS Feed | Gopher

OS X - Turn Bonjour off or on via the command line

Published: 04-06-2013 | Author: Remy van Elst | Text only version of this article


Table of Contents


This little snippet switches off Bonjour on OS X via the command line or AppleRemote Desktop. This is useful when you want to disable iChat or Messageschatting on the local network.

If you like this article, consider sponsoring me by trying out a Digital OceanVPS. With this link you'll get $100 credit for 60 days). (referral link)

Bonjour is Apple's implementation of Zero configuration networking (Zeroconf),a group of technologies that includes service discovery, address assignment, andhostname resolution. Bonjour locates devices such as printers, other computers,and the services that those devices offer on a local network using multicastDomain Name System (mDNS) service records.

To turn it off execute this command:

defaults write /System/Library/LaunchDaemons/com.apple.mDNSResponder ProgramArguments -array-add "-NoMulticastAdvertisements"

To turn it on again:

defaults write /System/Library/LaunchDaemons/com.apple.mDNSResponder ProgramArguments -array "/usr/sbin/mDNSResponder" "-launchd"
Tags: apple, apple-remote-desktop, ard, bonjour, dns, mac, mdns, os-x, rendezvous, snippets