CentOS / Red Hat / Fedora Linux Turn off Beep / Bell Terminal Sound
Q. I'm using CentOS Linux v5.x and I'd like to turn off the bell sound. How do turn off the beep?
A. Linux kernel has PC speaker beeper driver called pcspkr.ko. This driver is responsible for generating beeps while working at shell prompt / x terminal. To turn off the beep, simply remove driver from kernel. You also need to black list this driver so that it will not get loaded automatically.
Remove pcspkr driver
Login as the root user
Type the following command to unload the driver:
# rmmod -v pcspkr
Sample output:
rmmod pcspkr, wait=no
/etc/modprobe.d/blacklist file
Open /etc/modprobe.d/blacklist file:
# vi /etc/modprobe.d/blacklist
You need to append a module here prevents the hotplug scripts from loading it:
blacklist pcspkr
Save and close the file. Alternatively, you can unload driver by appending following line into /etc/rc.d/rc.local:
# vi /etc/rc.d/rc.local
Append following line:
/sbin/rmmod pcspkr
Save and close the file. There are other ways to turn off beep sound under Linux, if you don't have root level access.
Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
Related Linux / UNIX FAQ:
- Gnome Linux disable or turn off beep sound for Terminal, bash
- Fedora core Linux sound card configuration
- Linux: Why do I not hear sound when I play an audio CD or mp3 file?
- Linux laptop media player
- Fedora Core Linux chkconfig does not display service name
Discussion on This FAQ
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Please do not use the comment form to ask for help / question. Ask your question on the excellent Linux tech support forum. Thank you very much for stopping by our site!
Tags: /etc/modprobe.d/blacklist, beep sound, beeper, beeps, bell sound, bell style, console beep, disable beep, linux disable beep, linux disable console beep, linux disable system beep, linux kernel, linux turn off beep sound, linux turn off system beep, pc speaker, pcspkr, rmmod command, rmmod pcspkr, root user, silence, terminal beep, terminal bell, turn off beep in linux, turn off beep linux, x terminal ~ Last updated on: March 20, 2008



April 26th, 2008 (3 weeks ago) at 10:58 pm
I think that removing the speaker driver is too strong an option. If the problem is that the terminal beeps at the bash prompt (I’m thinking about the user pressing TAB, with too many options you get a beep), it would be enough the following
$ echo “set bell-style none” > $HOME/.inputrc
After you open a new X terminal, it doesn’t beep