How to Make or Create a Shortcut or Hotkey to Mute the Speakers on Ubuntu or Gnome? It is very simple if you are running the latest version of Ubuntu or Gnome. But If your version doesn’t have any easy option to do it you can do the same thing in many versions of Linux with a simple command line.
Setting the Shortcut on Ubuntu
Normally go to System >> Preferences >> Keyboard Shortcuts and then assign a Shortcut key to the Sound >> Volume mute item.
When you use the hotkey or Shortcut key you’ll see a little dialog pop up to show you what the current volume state is. You have to quickly hit the hotkey again to toggle back and forth.
Use Command / Scripts
Alternatively, you can assign a shortcut key to a script that uses the amixer utility to toggle the mute state. To test this out, just open the terminal window and then use below command:
|amixer sset Master toggle|
You can see the output right there in the console, telling you whether it’s now set to off or on and your volume icon show that the volume has been muted.
You can create a shortcut to run this command by right-clicking anywhere and using Create Launcher, adding in the full command from above into the Command box.