32

The system beep/bell happens frequently (ie, when I type a few letters then type tab to autocomplete when there are a few options).

How can I turn this off?

I googled it and tried:

set bell-style none (the command went through but nothing changed)

and

setterm -blength 0 (got a bash command not found)

Thanks!

Breck
  • 670
  • 2
  • 7
  • 22

7 Answers7

43

Add set bell-style none to .inputrc in your home directory. You need to start a new shell for this to take effect; that may be why your test didn't work.

Emerick Rogul
  • 6,706
  • 3
  • 32
  • 39
  • I've had this in .inputrc for some time now (across reboots even) and I still get the bell. Both in mintty *and* xterm. – exhuma Mar 12 '16 at 08:37
  • Great! I have to do this on every account that I ssh to. Thanks! – Luc M Jan 01 '18 at 01:41
23

The default terminal mintty has built-in options to control the terminal bell.

  1. Right-click on the background and click "Options..."
  2. Select the "Terminal" section.
  3. Change the "Bell" dropdown to "none"

Note: Here you can also enable or disable the visible bell (terminal flashing) and to highlight the taskbar icon on a bell ring.

Steven
  • 13,501
  • 27
  • 102
  • 146
6

Cut the wire to your speaker. :-)

James Cronen
  • 5,715
  • 2
  • 32
  • 52
2

An alternative solution that doesn't seem to be mentioned here is:

  1. Right click on the header of the Cygwin window and chose Options...:

enter image description here

  1. In the options menu, under the Terminal tab, choose "no beep":

enter image description here

This should take effect immediately without having to restart Cygwin.

Svend Hansen
  • 3,277
  • 3
  • 31
  • 50
  • 1
    Good answer but this solution *was* posted (albeit without the nice screenshots) a few years previously: https://stackoverflow.com/a/38980567/1640661 – Anthony Geoghegan Dec 10 '21 at 22:36
  • 1
    Ah, you're right. I guess I must have just read the accepted answer, and missed that one was explaining the same as I was :) – Svend Hansen Jan 16 '22 at 19:20
1

I experienced a series of beeps when I would cat a particular file. The above tips did not silence the bell. In my case, the beeps were due to bullet points that had been copy/pasted into the file. Replacing the bullets with dashes stopped the beeping.

incircuitous
  • 131
  • 6
0

Use mintty. Among many other advantages over the usual console, the bell is off by default.

ak.
  • 174
  • 1
0

Path to '.inputrc:

'C:\cygwin64\home\<username>\.inputrc
zombinary
  • 67
  • 9