Tested in Elementary OS Luna (based on Ubuntu 12.04 LTS) on a Lenovo Yoga 13.
To mute:
amixer set Master mute
To unmute:
amixer set Master unmute
This is useful if you want the volume to always be muted on boot, in case you start up the computer in class or whatever.