Wednesday 17 October 2018

HOW TO CHANGE SYSTEM VOLUME ON MAC OS USING COMMAND LINE

Oftentimes the awesome GUI applications we love are simply gloss over a command line functionality.  While I do love a visual app, it's always good to know how to do things from command line, if only for the sake of automation.  I've covered loads of command line secrets, most notably Mac Camera Access, so I wanted to figure out if I could control volume from command line.

The secret to changing Mac system volume from command line is through osascript:
# Max volume sudo osascript -e "set Volume 10" # Mute sudo osascript -e "set Volume 0" # 50% volume sudo osascript -e "set Volume 5"
Values range from 0 (muted) to 10 (maximum volume).  Note that you don't get to see a nice volume change indicator -- the volume simply changes without any feedback

No comments:

Post a Comment

10 WAYS TO EARN IN DOLLARS

 Remote Work or Freelancing: With the rise of remote work opportunities, you can find freelance work in various fields such as writing, grap...