18

If I'm in an empty Linux terminal in Windows (using the Windows Subsystem for Linux), and I hit backspace, I hear this annoying error-like sound. My Windows computer used to do this, but then I turned it off. How do I turn off this sound?

4
  • Do you have a link so I can better understand what that means? For everything I've been doing so far, it works just like a Ubuntu (which I think is a type of Linux) terminal.
    – Pro Q
    Commented Jun 13, 2018 at 18:52
  • 1
    Ubuntu is Gnu/Linux. But a lot of people are calling Gnu/Linux just Linux. Gnu/Linux is Gnu+Linux+X11+… Linux is the kernel, just a small part. The Free Software Foundation have been saying that we should call it Gnu/Linux for years, but most people think this is just them sulking because of lack of credit. However it is more a matter of practicality. What should you call it if you remove Linux (e.g. WSL, Cygwin, Gnu/Bsd, or …). Or what should you call it if you remove Gnu (e.g. android). And no it is not just like Ubuntu, there is much missing. Commented Jun 13, 2018 at 19:00
  • 1
    The link gnu.org/gnu/linux-and-gnu.en.html Commented Jun 13, 2018 at 19:00
  • 1
    Possible duplicate of How to disable Bash on Windows notification sound effect
    – Pro Q
    Commented Jun 18, 2018 at 18:59

4 Answers 4

28

If you want to stop bash generating error sounds without affecting other Windows programs, type the following:

bind 'set bell-style none'

If you want a permanent change, add it to the end of ~/.bashrc.

2
  • This answer certainly works, but ewertonvsilva's suggestion to edit /etc/inputrc seems preferable unless your installation has multiple users.
    – nortally
    Commented Dec 9, 2021 at 17:11
  • Doesn't work for me
    – NickW
    Commented Feb 8, 2023 at 18:04
5

Here using the WLS (Ubuntu for Windows) I had to edit at:

/etc/inputrc

Just run it and restart the terminal

echo 'set bell-style none' >> /etc/inputrc
3
  • no permission even using sudo Commented Jan 25, 2021 at 0:04
  • 3
    @viniciusgati, that is probably due to the redirection in the command. You could use sudo vi /etc/inputrc (or using another text editor you like in favor of vi) to edit the file. Or check this question for more details about the problem and other solutions.
    – wovano
    Commented May 14, 2021 at 18:24
  • 2
    Both "# bell-style none" and "# bell-style visible" are already present in /etc/inputrc. Just uncomment the one you wish to use by deleting the # at the beginning of the line. Extra credit: Review the other available libreadline options.
    – nortally
    Commented Dec 9, 2021 at 17:07
3

Similar to how you turn off the error sound for Windows, go into your Sound settings in the Windows settings. Select the Select the "Sounds" tab. Then select the "Critical Stop" sound, and change it to "None". This will stop the terminal from making that noise. (To stop the similar sound on Windows, set the "Default Beep" sound to "None".)

1
  • 2
    This will stop ALL error sounds though
    – Tom
    Commented Jun 1, 2020 at 4:12
0

If you're using the new Windows "Terminal" application (which is pretty slick) then you can go into Settings > [The profile you want to change] > Advanced > Bell Notification Style where you'll have the option to deselect "Audible" and optionally turn on "Flash window" or "Flash taskbar."

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .