How to Disable the Linux Terminal Bell Sound Temporarily or Permanently

The Linux terminal bell is a historical leftover from the days of mechanical teletypewriters. Whenever an error occurs, such as pressing the Backspace key at the beginning of a line or attempting to tab-complete an ambiguous filename, the terminal emits a sharp, audible beep. While some users find this helpful, it can be incredibly irritating in a quiet office environment or late at night. Depending on your workflow, you can silence the bell temporarily or disable it permanently across the entire system.

How to Disable the Bell Temporarily

If you only need to silence the bell for your current bash session without altering any system configuration files, you can turn off the readline bell using a quick command.

  1. Open your Linux terminal.
  2. Type the following command: bind 'set bell-style none'
  3. Press Enter.

The terminal will instantly become silent. However, the moment you close the window or log out, this setting will be forgotten, and the bell will return the next time you open a terminal.

How to Disable the Bell Permanently for Your User

To permanently disable the bell for your specific user account across all future terminal sessions, you must modify the input configuration file.

  1. Open your terminal and ensure you are in your home directory by typing cd ~.
  2. Use a text editor like nano to open or create the .inputrc file: nano .inputrc
  3. Add the following line to the file: set bell-style none
  4. Press Ctrl + O to save, and Ctrl + X to exit nano.

You will need to completely restart your terminal application or log out and log back in for this permanent change to take effect.

How to Disable the Hardware Beep System-Wide

On some desktop Linux distributions (like Debian or older Ubuntu versions), the bell is actually a kernel module called pcspkr that triggers your motherboard’s physical internal speaker. Disabling the bash bell above will not stop this hardware beep. To kill it at the kernel level:

  1. Open the terminal and run: sudo rmmod pcspkr to instantly unload the module and stop the noise.
  2. To prevent it from ever loading again on reboot, you must blacklist the module. Open the blacklist configuration: sudo nano /etc/modprobe.d/blacklist.conf
  3. Add this line to the bottom of the file: blacklist pcspkr
  4. Save and exit the file.

Your Linux machine will never emit a hardware beep again.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.