Angelo
Angelo
I am Angelo. A systems engineer passionate about Linux and all open-source software. Although here I'm just another member of the family.

How to Turn off beep / bell on linux terminal on Rocky/Almalinux /Redhat 9

Hello, friends. In this post, you will learn a simple trick in practice but quite useful for those who work a lot with the terminal. Today, you will learn how to turn off beep / bell on Linux terminal on Rocky Linux / Alma Linux / Red Hat 9.

It turns out that when a person uses Linux and his terminal a lot, it is because he is working in demanding or important situations. So, imagine that every time you use the tab key, then a noise comes out of nowhere. Once is fine, but frequently? I think that’s not ideal.

There are other, more extreme situations where the terminal starts making sounds out of nowhere, making the situation worse. So for this, we have the solution, and it is nothing more than disabling the beep / bell of the terminal.

Let’s go.

How to Turn off beep / bell on Linux terminal on Rocky Linux / Alma Linux / Red Hat 9

The process is easier than you think and can work on almost any Linux distribution. So let’s go.

First, as I always recommend, update the whole distribution

sudo dnf update

To achieve our goal, we need to edit just one configuration file. For editing, you can use any terminal or graphical text editor like nano.

 sudo nano /etc/inputrc

And inside the file uncomment the line set bell-style none.

# set bell-style none

to

set bell-style none
Turn off beep / bell on linux terminal
Turn off beep / bell on linux terminal

Save the changes and close the editor to apply the changes.

The effect should be immediate.

Another more drastic method

There is an even more drastic method, and that is to remove the pcspkr module from the kernel. I say it is more drastic because we are directly touching modules and not configurations, but the method is just as safe.

To remove the module from the kernel, run

sudo rmmod pcspkr

However, the effects will last until the computer is rebooted. If you want to make it permanent, then add that module to the blacklist. First edit the file.

sudo nano /etc/modprobe.d/blacklist.conf file

And then add

blacklist pcspkr

That should do it.

Conclusion

The use of the terminal is quite normal these days, especially for sysadmin or Linux professionals. This simple trick can help you with your work.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook

x