Newer Mac Laptops have USB-C instead of MagSafe or MagSafe 2 for charging. When you insert your USB-C power adapter into your Mac Laptop with a USB-C port you will hear a charging chime that verifies your Mac Laptop is charging. Older Mac Laptops without USB-C do not have this function. You can enable this charging chime with this simple terminal command.
PS: The charging chime on the newer Mac Laptops is the exact same chime used on iPhones and iPads to verify charging on those devices too.
Disconnect your MagSafe/MagSafe 2 power adapter.
Go to the spotlight search and search for Terminal. Open Terminal by double clicking it in the results area.
Paste the following command into the Terminal window and press enter
defaults write com.apple.PowerChime ChimeOnAllHardware -bool true; open /System/Library/CoreServices/PowerChime.app &
Terminal may automatically press enter for you. This may vary depending upon circumstances.
Done! Reconnect your MagSafe/MagSafe 2 power adapter and you should hear the charging chime
Your volume must be raised in order to hear the chime