About Linux FAQ

Browse More FAQs:

CentOS / Red Hat / Fedora Linux Turn off Beep / Bell Terminal Sound

Posted by Vivek on Thursday March 20, 08 @8:06 pm

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:

Discussion on This FAQ

  1. Miguel Says:

    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

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!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Tags: , , , , , , , , , , , , , , , , , , , , , , , , ~ Last updated on: March 20, 2008

Copyright © 2006-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.