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?

Pro Q
  • 389
  • 1
  • 3
  • 19
  • Note there is no Linux in Windows Subsystem for Linux. They took Gnu/Linux and removed Linux. Cygnus did this over 20 years ago. – ctrl-alt-delor Jun 13 '18 at 18:51
  • 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 Jun 13 '18 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. – ctrl-alt-delor Jun 13 '18 at 19:00
  • 1
    The link https://www.gnu.org/gnu/linux-and-gnu.en.html – ctrl-alt-delor Jun 13 '18 at 19:00
  • 1
    Possible duplicate of [How to disable Bash on Windows notification sound effect](https://superuser.com/questions/1108120/how-to-disable-bash-on-windows-notification-sound-effect) – Pro Q Jun 18 '18 at 18:59

3 Answers3

27

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.

AFH
  • 17,300
  • 3
  • 32
  • 48
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
ewertonvsilva
  • 151
  • 1
  • 2
  • no permission even using sudo – vinicius gati Jan 25 '21 at 00: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](https://unix.stackexchange.com/questions/106663/how-to-run-a-command-that-involves-redirecting-or-piping-with-sudo) for more details about the problem and other solutions. – wovano May 14 '21 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 Dec 09 '21 at 17:07
2

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".)

Pro Q
  • 389
  • 1
  • 3
  • 19