Global disable on Linux
You just have to remove the pcspkr module.
Temporary remove on all Linux distributions :
# rmmod pcspkr
Complete remove on Debian and derivate (Ubuntu, Mepsis, …) :
# echo "blacklist pcspkr" >> /etc/modprobe.d/blacklist
Turn off bell on FreeBSD
For the session :
# sysctl hw.syscons.bell=0
Full time :
# echo "hw.syscons.bell=0" >> /etc/sysctl.conf
Disable bell only in a Linux shell
Enter this command in your shell :
setterm -bfreq 0
Disable bell in Firefox
In about:config set accessibility.typeaheadfind.enablesound to false.