Change the system volume from the command line
There are several ways to go about changing the volume on your Mac, but did you know you can use the command line? I’m a big command line junkie so the more things I can do from the Terminal the better. Without further ado, here’s the necessary commands:
Mute your Mac:
sudo osascript -e "set Volume 0"
sudo osascript -e "set Volume 10"
Both of these commands will ask for your root password because of the usage of ‘sudo’ which runs the osascript command as the administrator. As you may have guessed, you can fill in other numbers in place of 0 and 10 for other sound levels. Enjoy!