43

I've seen different ways to turn off the annoying Ubuntu beep but what is the best way to turn it off permanently through software?

5
  • What is the Ubuntu beep?
    – innaM
    Jul 30, 2009 at 15:43
  • the noise the pc speaker on system error Jul 31, 2009 at 15:05
  • system error ?
    – innaM
    Jul 31, 2009 at 21:13
  • 1
    Who is responsible for this bell??
    – Soerendip
    Dec 11, 2019 at 9:48
  • 1
    The PC speaker beep should be made illegal by international law.
    – Teekin
    Jan 11, 2023 at 13:48

6 Answers 6

34

disable the warning beep you can do so by editing your /etc/rc.local file. Open the file in your editor of choice and go all the way to the bottom of the file. At the bottom there should be a line which reads exit 0. Add a new line directly above this one and put this on that line:

modprobe -r pcspkr 

Save the file and this will turn off the system beep. If you want to turn the system beep back on, just edit this file again and remove the line that was added.

(OR)

You can disable this by editing a file and entering two simple lines.

gedit /etc/modprobe.d/blacklist

And then add:

blacklist pcspkr

Save your file and the speaker beep will be gone when you reboot.

If you don’t want to wait until a reboot, simply type:

sudo rmmod pcspkr

(OR)

You can disable system bell if in the Terminal you go to Edit->Current Profile->General and uncheck the Terminal Bell Or in the Configuration editor go to apps->Gnome-Terminal->Profiles->default check silent Bell.

(OR)

Edit the .inputrc file in your home directory (create it if needed) and add the line

set bell-style visible

You can also add (or uncomment) this line in the general /etc/inputrc file to set the bell-style for all users (overriden in ~/.inputrc).

5
  • 1
    This also works: xset -b
    – teabot
    Feb 12, 2010 at 11:53
  • 4
    Is that period "." supposed to be at the end of "modprobe -r pcspkr"?
    – Bort
    Nov 30, 2013 at 0:48
  • 1
    The file is /etc/modprobe.d/blacklist.conf in on a Ubuntu 16.04 machine. However as pcspkr is blacklisted by default and the beep is there nevertheless for me I supppose it's the BIOS setting for “power events” one has to change, see How to turn off beep on suspend in xubuntu.
    – dessert
    Oct 24, 2017 at 10:11
  • 2
    Too much noise in this outdated answer. /etc/rc.local for example is not anymore there.
    – Antonio
    Sep 29, 2021 at 7:27
  • Only the bell-style thing worked for me. But it did work, so +1 Oct 23, 2023 at 15:43
26

Tested on Ubuntu 18.04 and Ubuntu 20.04:

Enter Terminal's menu: enter image description here

Then "preferences" > (Active profile, it's under profiles with a check mark) > "text" (tab) > "sound" > "terminal bell" and unchecking it fixed the issue.

4
  • I also had to change the font and colors, so this is the easiest of all for me.
    – thanos.a
    Oct 16, 2020 at 7:40
  • OP asked for system-wide disabling of this bell. Not just in terminal. Jan 30, 2022 at 5:52
  • Observation / feedback: The neatly enumerated methods from joe's answer ( previous answer above ) could either not be implemented on Ubuntu 20.04 or did not produce the desired result ( despite this: thank you joe ). What does seem to work on Ubuntu 20.04 is Iman Mohamadi's recommendation.
    – darbehdar
    Mar 21, 2022 at 7:54
  • This answers works to deactivate the bell inside the Terminal. It doesn't work for the bell sound in other app, like Files for example. Apr 14, 2023 at 1:19
6

Ubuntu 16, search the applications for Sound, click on "sound effects" tab, Set the alert volume under that tab to "Off"

0
4

Disconnect the PC speaker inside the Chassis.

That is the simple answer.

3
  • 11
    Maybe because the OP asked for a software solution...
    – Calmarius
    May 16, 2015 at 10:07
  • 3
    Try doing it in a laptop without messing up. Your answer doesn't make any sense.
    – ascoder
    Aug 21, 2021 at 19:23
  • "That is the simple answer." Depends. Editing ~/.inputrc took me a few seconds (and can be automated for installing new computers), while finding a screw driver to open my pc would take me much longer. And the system error/beep/bell is not always played through the PC speaker so it wouldn't work in that case. And obviously this solution disables more than just the system beep. I understand this could be an acceptable solution for some users, but it's kinda overkill and certainly not the simplest one.
    – wovano
    Jan 10, 2023 at 8:40
4

The best way is to disable the pcspkr driver, that way you don't have to undo any hardware changes in the future. Open up a terminal and enter the following:

sudo modprobe -r pcspkr

Then, if you want to avoid doing this every time after rebooting, append the following line to your /etc/modprobe.d/blacklist file. If it's not there, create it.

blacklist pcspkr
1
  • This absolutely does not work on ubuntu 18.04.2! Apr 17, 2019 at 6:32
3

Check out this answer over on serverfault

Disconnecting the speaker works too ;)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .