Disable that damn PC speaker under Linux

I have finally got fed up enough with the irritating beeping coming from my Ubuntu box that I looked up how to disable the speaker. It turns out there are a variety of approaches:

To just disable beeping in bash (and most other shells) add the following line to /etc/inputrc

set bell-style none

To disable beeping in the MySQL console add the following line to ~/my.cnf


Or, to turn off all Linux-generated beeping you can remove the offending “pcspkr” module completely using

/sbin/modprobe -r pcspkr

If you want this to happen on every restart, add it to the appropriate startup script (in Ubuntu Heron this seems to be /etc/rc.local)

One Comment

Comments are closed.