every time when mac os boots or startups from shutdown situation,
the mac os will play a loud "pong" sound as reminder,
you can temperally mute this sound by pressing the F10 function button,
however, in order to terminate it for good,
I tried several ways, finally this one did the work,
here it is,
first of all, start a terminal window when you login to mac os,
try press "command+space", to use spotlight search,
in your terminal window, make two bash files,
$ sudo nano /Library/Scripts/sound-off.sh
inside the sound-off.sh, save these contents:
#!/bin/bash
osascript -e 'set volume output muted 1'
###
and save those to sound-on.sh in the same directory, which is "/Library/Scripts/"
#!/bin/bash
osascript -e 'set volume 4'
###
then make these two scripts have the privilege to execute by using "chmod"
$ sudo chmod u+x /Library/Scripts/sound-on.sh
$ sudo chmod u+x /Library/Scripts/sound-off.sh
at last, make these actions to active in mac os by using:
$ sudo defaults write com.apple.loginwindow LogoutHook /Library/Scripts/sound-off.sh
$ sudo defaults write com.apple.loginwindow LoginHook /Library/Scripts/sound-on.sh
these steps did work on mac os mojave 10.14.2
or you can just download a free app from App store called "Silent Start"
if you decided to use Silent Start, you can still undo the write defaults above by execute these commands:
$ sudo defaults delete com.apple.loginwindow LogoutHook
$ sudo defaults delete com.apple.loginwindow LoginHook