How to Turn off the PC Beep in Linux

Some computers have an internal speaker that beeps to alert the user to various actions, such as the computer being shut down. This alert does not come from the sound card, which can be muted. The Linux operating system uses a kernel module to turn on the alert. Turn off the alert by blacklisting it from the kernel. You must have root (administrator) privileges to make any changes to the Linux kernel.

Instructions

    • 1

      Open a terminal window or Konsole window to access a command prompt where you will type the commands that follow. The "Terminal" and "Konsole" applications are found under the "Applications" or main programs menu (in the control panel) or by right-clicking on the desktop.

    • 2

      Type the command "su -" at the command prompt to become the root user. Ubuntu and Linux Mint users: Skip this step and type "sudo" before the next command.

    • 3

      Type the command "vi/etc/modprobe.d/blacklist" at the command prompt that appears when you have typed the root password. This opens the kernel blacklist file in the Vi text editor. The file is called "blacklist.conf" in Debian-based systems such as Ubuntu. You can replace "vi" with the name of your favorite text editor. Depending on your kernel configuration, this may be a blank file.

    • 4

      Add the following two lines to the bottom of the file. If the file is blank, start the file with these lines:

      #Disable PC speaker

      blacklist pcspkr

      The first line is a comment line that indicates what you are blacklisting. The second line turns off the PC speaker permanently.

    • 5

      Save and close the file.

    • 6

      Type the command "rmmod pcspkr" at the command prompt that appears when you have closed the file. This removes the PC speaker module without a reboot. Ubuntu and Linux Mint users: Type "sudo" before this command.

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured