The fastest way to disable PC speaker in Ubuntu

There are several ways to disable usually noisy PC speaker in Ubuntu Linux (this is what beeps every time you wish to keep silent). The fastest one is just to unload its kernel module/driver:

sudo modprobe -r pcspkr

Add the the line “blacklist pcspkr” to /etc/modprobe.d/blacklist to turn off the speaker forever :)

 
 
» You might also be interested in the following articles:
FAQ: How to select fastest APT server in Debian
Disable double hyphen to dash wordpress replacements
FAQ: How to disable directory browsing in apache/httpd?
Download or Upgrade Ubuntu at highest speed
FAQ: How to disable/remap a keyboard key in Linux?



» Want to stay up to date? Subscribe to our E-MAIL or RSS feed!

11 Responses to “The fastest way to disable PC speaker in Ubuntu”


  1. 1 AllXboxGames

    this is one of the best tips I have read anywhere

  2. 2 ryanhaigh

    I see your sudo modprobe -r pcspkr and raise you sudo rmmod pcspkr

    This module REALLY needs to be blacklisted by default!

  3. 3 CaliforniaSuperLottoPlus

    This is awesome, thanks.

  4. 4 awerxx

    What, in case where hardware problem occurs? To diagnose a problem we using beep sequence depending on BIOS. Those disabled speaker not supporting such a diagnose?

  5. 5 ryanhaigh

    @awerxx
    The beeps that you would use to diagnose a problem ussually occur at startup which is independent of the os.

  6. 6 Atlantis CasinoReno

    Cool tip!

  7. 7 Cody

    Very useful tip. I have always hated how the PC speaker beeps when I do something simple, like hitting backspace one too many times in the terminal. This helps out a lot.

  8. 8 max payne

    Thanks so much, I hate the guts of the PC speaker, wakes up the neighbourhood.

  9. 9 zdaddy

    Awesome tip, this is one of the first things I do now on a new install.
    Newbies might get thrown off by the missing .conf. Here’s the command line method of opening the blacklist.conf file:
    gksudo gedit /etc/modprobe.d/blacklist.conf

  10. 10 John Dondapati

    Really cool tip. Thanks a bunch!

  1. 1 Links of the Week

Friendly Sites:Who is behind Linux Screw?
Aspiring Sysadmin | GeekyBits³ | Bash Cures Cancer | TOTMS
Linux Operating System | Small Linux Deployments | My SysAd Blog
The Danesh Project | ZEPY | Linux config Wiki | Planet Sysadmin
The Sys Admin | {buhay sysad} | a non-geek's linux notes
Linux HOWTOs, Tutorials & Projects with Adam Palmer | LinuxAlt.Com
My name is Artem Nosulchik (artiomix AT gmail DOT com) and I'm Linux/Unix, Cisco systems engineer. The main idea of Linux Screw is to share relevant knowledge, skills and observations over The Web. Here you can find a lot of information related to different Linux distributions, FreeBSD, IOS as well as a other Open Source around staff. Read more ››