How to disable plug in sound on late 2016 macbook pro?
defaults write com.apple.PowerChime ChimeOnAllHardware -bool false; killall PowerChime


It resets upon boot up but this will do it temporarily.  I'd love to find out how to disable this permanently.

EDIT: I am so proud of myself.  Here is what a dummy can learn to do for himself.  After I found that code for Terminal above, I had to figure out how to make that command run upon login.

Open TextEdit and type

#!/bin/bash

defaults write com.apple.PowerChime ChimeOnAllHardware -bool false; killall PowerChime

exit 0


... and save it on the desktop as "PCK.txt."  (Powerchime killer)

Rename that file to "PCK.ps"

Open up Terminal and enter

cd ~/desktop


to navigate to the desktop, where the PCK file is.  Then type

chmod +x PCK.ps


Now you can test the script if you want, hopefully it works and the sound is killed!

Next, under the Terminal drop down menu, there are preferences.  Under the Profiles tab there is a Shell "sub tab" on the right.  In this tab there is a "When the shell exits" section, under which is a box that you can choose one of three options.  I chose "Close if the shell exited cleanly," and now when I double click my "PCK.ps" file, a Terminal window flashes and that stupid powerchime is dead.

The final step is to add PCK.ps to my specific user login items.  The login items are located in Preferences / Users and Groups / >user of choice&lt; / Login Items.  Then, click the plus sign and browse to PCK.ps and add it.  Check the box and now try a reboot!