Ubuntu – Mute sound effects on Ubuntu from command line

audiocommand linesettingsUbuntu

How can I mute alerts on Ubuntu Precise on the command line, like in System settings > Sound > Sound effects?

Best Answer

If you're just trying to mute audio, this should work on most modern Ubuntu distros:

amixer set Master mute

Of course, YMMV with older distros or custom sound setups.

Update: (for event sounds only)

I don't have an Ubuntu 12.04 LiveCD handy to test, but on 16.04 you can use gsettings to disable just the event-sounds key like so:

gsettings set org.gnome.desktop.sound event-sounds false

Note: That only applies the settings for the current user.

The core settings haven't changed much over the past few years, so it may do what you need. Run the command with true to re-enable event sounds.

gsettings is just a wrapper for dconf, so if you want graphical state verification, you can sudo apt-get install dconf-editor. Running dconf-editor will give you a GUI to manage a number of higher-level system settings. Use the left dropdown list to navigate to org > gnome > desktop > sound to find the event-sounds option.

Related Question