How to Change the Volume of System from Command Line
STEP 1. Simply use the command given below to mute your Mac:
sudo osascript -e “set Volume 0″
STEP 2. Use the commend given below to get maximum volume:
sudo osascript -e “set Volume 10″
That’s it. You can put other numbers in place of 0 and 10 to get other sound levels. You should note you have to enter your root password because of the usage of ‘sudo’ which runs the osascript command as the administrator.