Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've recently started using a new desktop PC with Ubuntu Linux installed. However the terminal beeps annoyingly. i.e. If I'm at the start of the line and I press Backspace, it'll beep to tell me that there are no characters to delete. Of if I am trying to tab complete and there are no completions for it, then it'll beep.

How do I turn this off?

share|improve this question

closed as off-topic by masegaloeh, Jenny D, mdpc, Rex, 84104 Apr 16 '15 at 18:11

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow." – masegaloeh, Jenny D, mdpc, Rex, 84104
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 15 down vote accepted

As the pc speaker is annoying altogether (at least, I think it is), I just go

modprobe -r pcspkr

and add it to /etc/modprobe.d/blacklist.conf like this:

blacklist pcspkr

No more beeps. Ever.

Does not work for bells through /dev/snd/*, obviously

share|improve this answer
Newer kernels use snd_pcsp instead, if the above does not work. Try modprobe -r snd_pcsp and blacklist snd_pcsp. – Joseph Kern Jun 16 '09 at 10:29
Throwing the baby out with the bath water! – Dan Carley Jun 16 '09 at 11:23
I think 'Throwing the baby out with the bath water' would be unplugging the pc speaker ;-) – Kyle Brandt Jun 16 '09 at 11:26
+1 This answered my opposite question: "how do I get terminal beeps to work?" – Ternary Apr 11 '13 at 14:53

Easiest fix: put

set prefer-visible-bell on

in your .inputrc.

This however will only work for applications using the readline library (this includes bash). Other applications may still decide to beep at you.

If you want to disable all beeping, you will have to do it in the terminal. How to do this depends on your terminal. In xterm it's option -vb (also works in many other terminals, e.g. in rxvt). Most graphical terminals have a config option for this.

Also see the Visible bell mini-Howto for all the dirty details.

share|improve this answer

In addition to the setterm and Gnome settings solutions already suggested there are the following:

If running X, open an xterm and enter xset b off

To disable system bell in bash startup edit ~/.inputrc or /etc/inputrc and add the line "set bell-style none" or "set bell-style visual" if you want a screen flash.

There's a good article on this here

share|improve this answer

setterm -blength 0

you'll want to add this to your bash profile

share|improve this answer

from cybercity:

  • Open Gnome terminal
  • Click on Settings > Preferences > Silence Terminal Bell
share|improve this answer
Those sound like the instructions for a KDE application, and don't work exactly right on Gnome Terminal. However you were on the right track. – Rory Jun 16 '09 at 9:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.