For anyone interested, here is my step by step to turning off the default startup sound. This builds on Hippomormor's posts back in October, filling in the gaps for basic users such as myself and adding a bit of context. The context may not be perfect, but I'm running Mavericks 10.9.2 and this works.
open terminal
type
sudo vim /Library/Scripts/mute-on.sh
this creates a mute-on.sh script file in a vim (editor) instance
press ‘i’ this will allow you to enter or ‘insert’ text
type
#!/bin/bash
osascript -e 'set Volume with output muted'
the first line means run this script in bash. 'bash' is a shell. A shell is a program that takes your commands from the keyboard and gives them to the operating system to perform.
the second line says “run the following statement 'set Volume with output muted’”.
Applescript adopts a plain English approach and this string mutes the volume. To unmute, which we’ll have to do below, the statement will change to ‘set Volume without output muted’. I guess the plain English approach only goes so far.
press ‘Esc’. This gets you out of the ‘insert text’ mode in the vim editor
hold ‘Shift’ and press the 'z' key twice. This gets you out of the vim editor and back into Terminal
type
sudo nano /Library/Scripts/mute-off.sh
this creates a mute-off.sh file in the nano editor. why use a different editor? not sure.
in your nano instance, type
#!/bin/bash
osascript -e 'set volume without output muted'
- Press ‘control + x’ then ‘y’ then ‘enter/return’
‘control + x’ is the Exit command in the nano editor, ‘y’ for “Yes, please” and ‘enter/return’ to save it to the default chosen file (the one you’ve been editing)
You’re back in Terminal
type
sudo chmod u+x /Library/Scripts/mute-on.sh
press ‘enter’
you’ll be asked to enter your administrator password
then type
sudo chmod u+x /Library/Scripts/mute-off.sh
I was not asked for another password
then type
sudo defaults write com.apple.loginwindow LogoutHook /Library/Scripts/mute-on.sh
press ‘enter’
this tells the computer to run the mute-on script when logging out
then type
sudo defaults write com.apple.loginwindow LoginHook /Library/Scripts/mute-off.sh
press ‘enter’
this tells the computer to run the mute-off script when logging in
Close your Terminal window and restart your computer a couple of times and enjoy the silence.
Hopefully this helps and works for you too.