imho, the winning lazy-friendly solution is this:
System > Preferences > Sound
And just tick 'Mute'.
@geofs: The method you've offered didn't work for me.Do not unplug your internal speaker or make boot scripts
Edit the .inputrc file in your home directory (create it if needed) and add the line
set bell-style visible
this will replace the beep by a flashing screen. You can replace 'visible' by 'none' to get nothing at all.
You can also add (or uncomment) this line in the general /etc/inputrc file to set the bell-style for all users (overriden in ~/.inputrc).
You have to log out to enable this setting.
PS: this also works in xterm/konsole/gnome-terminal
I'm using LMDE x64 (which is debian-based but very similar to ubuntu) and there was no .inputrc file in my home.
I could find /etc/inputrc but uncommenting the line you mentioned didn't affect anything.
But the method WolfJay_83 offered worked for me too. Thank you WolfJay_83.Turn off (mute) system beep
For anyone with a laptop who works in a library or other quiet area, system beeps every time you press the backspace key one too many times, or just using emacs, can be quite disturbing.
To shut them off:
open an xterm or terminal, and enter the two lines
xset b off
xset b 0 0 0
Hope this helps.
note: this does not work if run before X. To have it run as default, you can place it in your .xinitrc before the windowmanager. If you're using Gnome or KDE, it is probably easier to just turn off the "System Bell" or set it to "Visable Only" in your respective settings manager.
None of these methods worked for my Dell Latitude E6510. The shutdown beep was driving me crazy.
It turns out there is a hidden mixer in the volume control called, funnily enough, "Beep." If you make this visible in Volume Control preferences and mute it, the evil beep is gone. You can also probably do the same in alsamixer.