The audible bell in bash can be really annoying espcially if you are like me and use filename completion ( Tab-Tab) a lot.
Here is how you turn it off. Edit the
/etc/inputrc global resource file for bash, and disable audible bell. You just need to delete a single comment character on line 21 of the
rc file. You will need to
sudo as this file requires superuser permission.
sudo vi +21 /etc/inputrc
i to switch to input mode, delete the
# comment character at the start of the line. Press
Esc to exit input mode, then type uppercase
ZZ ( that's Shift-Z twice) to save and exit
Line 21 of your rc file should now like like this.
# do not bell on tab-completion set bell-style none # set bell-style visible
Exit your Bash terminal and restart the terminal and that annoying beep should be gone.
If you also use
vi (it's great for quick fixes), you should also disable the audible bell. To do this, change to your home directory with the
cd command and edit a (new) file called
.vimrc to add a single line:
cd vi .vimrc
Then add the following line (again, switch to input mode first by typing
i), then add the following line:
To exit, press
Esc to exit the input mode, and type upper case
Z twice to Save the file and quit.
As I am actively exploring WSL and PengWin and hitting any issues, I'll drop my solutions here. It might just help you, so feel free to mention me on twitter, and let me know how you get on. ;-)