Notify the system that preferences were changed I disabled SIP (How do I disable System Integrity Protection (SIP) AKA &quot;rootless&quot; on OS X 10.11, El Capitan?) and started editing the file /Library/Preferences/SystemConfiguration/preferences.plist

I successfully edited the entries HTTPProxy, HTTPPort, HTTPEnable and save the file. Then I checked my IP address on the web, and it doesn't change. The file is set correctly, but the system doesn't know it changed and therefore it uses the old settings. When changing settings manually, hitting Apply in the Network Tab notifies the system that preferences.plist has changed and that it must use the new settings. Same goes for turning wifi off and on. I changed the file, checked the IP (it is the same) turn wifi off/on, checked the IP and now it has changed.

How can I trigger that event of notifying the system of changes programmatically on a Mac?
Your question needs some editing and clarification.

What I think you're asking is, how to force OS X to re-load data after editing a plist file.  There are two methods of doing this.

OS X uses a caching daemon for preferences, cfprefsd.  You can simply save your plist file, then do  sudo killall cfprefds.  It will restart automatically, and should load your changes.

The recommended way of forcing changes is with the defaults command, which informs the daemon of the changes. For example


# Reveal IP address, hostname, OS version, etc. when clicking the clock
# in the login window
sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName