How to disable Bash on Windows notification sound effect
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------
Take control of your privacy with Proton's trusted, Swiss-based, secure services.
Choose what you need and safeguard your digital life:
Mail: https://go.getproton.me/SH1CU
VPN: https://go.getproton.me/SH1DI
Password Manager: https://go.getproton.me/SH1DJ
Drive: https://go.getproton.me/SH1CT
Music by Eric Matyas
https://www.soundimage.org
Track title: Lost Jungle Looping
--
Chapters
00:00 How To Disable Bash On Windows Notification Sound Effect
00:27 Accepted Answer Score 108
01:36 Answer 2 Score 8
01:47 Answer 3 Score 20
02:01 Answer 4 Score 5
02:28 Thank you
--
Full question
https://superuser.com/questions/1108120/...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#windows10 #bash #windowssubsystemforlinux #windows10v1607
#avk47
ACCEPTED ANSWER
Score 108
The answer given by Wouter works better overall once set up, but it can be slightly confusing to get working as the correct option doesn't always appear. Follow these steps:
- Right click the volume control in the Windows taskbar
- Open the Volume Mixer
- Open the Bash on Windows console
- Do something to trigger the console making the notification sound (e.g. press backspace on an empty line). If you've disabled the notification using the alternative method below, you'll have to undo it.
- Now a Console Window Host option should have appeared in the Volume Mixer (you might have to scroll right)
- Mute its sound setting
Previous/alternative method
You can simply run the following command from within your Windows Bash shell [source]:
echo "set bell-style none" >> ~/.inputrc
or else edit .inputrc
manually with a text-editor to add set bell-style none
on it's own line.
You'll need to restart your currently open bash shell before it takes affect.
This will only work for your current user, and won't help if you ssh into other accounts (unless you run that command again for each account).
ANSWER 2
Score 20
Add this to ~/.inputrc
set bell-style none
Additionally for vi, add this to ~/.vimrc
set visualbell
set t_vb=
ANSWER 3
Score 8
Another way is to open the Volume Mixer by right clicking on the volume control in the Windows taskbar and mute the Console.
ANSWER 4
Score 5
If you would like to just change the sound to something less annoying instead of disabling it completely, you can go to Change system sounds
from Start Menu (or under Control Panel -> Hardware and Sound -> Sound) and change the Critical Stop
sound to something like "Windows Default" or "Windows Ding".
Note that this will affect any other Windows program, or Windows itself, which uses the same sound effect. I'm not able to find a good list of which actions/notifications use that sound by default.