What is the best way to turn off the Ubuntu beep permanently?

19

2

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?

Craig Angus

Posted 2009-07-30T15:30:32.983

Reputation: 567

What is the Ubuntu beep? – innaM – 2009-07-30T15:43:17.130

the noise the pc speaker on system error – Craig Angus – 2009-07-31T15:05:36.207

system error ? – innaM – 2009-07-31T21:13:42.017

Who is responsible for this bell?? – Sören – 2019-12-11T09:48:52.783

Answers

19

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:

silly speaker beep

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).

joe

Posted 2009-07-30T15:30:32.983

Reputation: 11 615

This also works: xset -b – teabot – 2010-02-12T11:53:24.863

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 – 2017-10-24T10:11:47.547

1Is that period "." supposed to be at the end of "modprobe -r pcspkr"? – Bort – 2013-11-30T00:48:37.750

6

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

Cormac McGaughey

Posted 2009-07-30T15:30:32.983

Reputation: 61

4

Disconnect the PC speaker inside the Chassis.

That is the simple answer.

Axxmasterr

Posted 2009-07-30T15:30:32.983

Reputation: 7 584

4Maybe because the OP asked for a software solution... – Calmarius – 2015-05-16T10:07:51.763

1Why the downvote? This solution works! I have even done this one myself a time or two. – Axxmasterr – 2009-07-31T13:45:47.937

3

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

Thor

Posted 2009-07-30T15:30:32.983

Reputation: 3 562

This absolutely does not work on ubuntu 18.04.2! – Iman Mohamadi – 2019-04-17T06:32:24.330

2

Check out this answer over on serverfault

Disconnecting the speaker works too ;)

Russell Heilling

Posted 2009-07-30T15:30:32.983

Reputation: 690

0

For me (ubuntu 18.04) going to "terminal menu" > "preferences" > (Active profile, it's under profiles with a check mark) > "text" (tab) > "sound" > "terminal bell" and unchecking it fixed the issue.

Iman Mohamadi

Posted 2009-07-30T15:30:32.983

Reputation: 101