If you are like me then you must hate the “BEEP!” that comes along with Linux. Turning it off in KDE or Gnome is easy but what if you are on the virtual console? Here’s how you get rid of the “BEEP!” temporarily or permanently.

Temporary solution,

** make sure to be root or use sudo **

  1. Check if you have the pcspkr module loaded.
[[email protected] ~]# lsmod | grep pcspkr

pcspkr                  7105  0
  1. Remove the module. lsmod will return nothing if the module was removed.
[[email protected] ~]# rmmod pcspkr

[[email protected] ~]# lsmod | grep pcspkr
  1. Restore the module when done.
[[email protected] ~]# modprobe pcspkr

[[email protected] ~]# lsmod | grep pcspkr

pcspkr                  7105  0

Permanent solution,

** make sure to be root or use sudo **

  1. add the pcspkr module to the modprobe blacklist file.
[[email protected] ~]# vi /etc/modprobe.d/blacklist

Add the lines below to the file.

# pcspkr - turn off pc speaker "BEEP!"

blacklist pcspkr
  1. Reboot, and check if the pcspkr module was loaded. If the blacklist file kicked in then nothing will be returned.
[[email protected] ~]# lsmod | grep pcspkr

This fix works for my CentOS and Ubuntu but not openSUSE as the pcspkr driver is built right into the kernel.