LKBEN11027: Howto deactivate the bell or beep under linux
LKB | Created: 02/04/2020 | Version: 0 | Language: EN | Rating: 0 | Outdated: False | Marked for deletion: False
Author: Wim Peeters - Keskon GmbH & Co. KG
Symptom
You are nerved by the beeping of your system by every error you make
Cause
This is by design
Solution
First thing you need to know is where to deactivate the bell / beep. As you might have found out, there are a lot of possible reactions your system can produce and these depend on the shell, the editor or even the desktop you are using.
To deactivate the bell under bash you can try the following:
setterm -blength 0
This sets the bell duration to 0 milli seconds or you can use the setting in .bashrc
set bell-style visible
Note that these settings only work in a normal command line bash. This is not the case for "konsole" in kde. There we can use the setting menu, click on the bell and set it to visible.
Under vi you need to do the following:
:set visualbell
Under X-windows we normally use:
xset b off
Hope this helped you.
About the Author
Wim Peeters is electronics engineer with an additional master in IT and over 30 years of experience including time spent in support, development, consulting, training and database administration. Wim has worked with SQL Server since version 6.5. He has developed in C/C++, Java and C# on Windows and Linux in different European countries and different European languages. He writes knowledge base articles to solve IT problems and publishes them on the Lubby Knowledge Platform where he is one of the most important contributors and the main developer.