Categories: TutorialsUbuntu

How to Turn off error sound on Ubuntu 18.04

Have you ever been working in your Ubuntu terminal when suddenly that jarring error sound interrupts your flow? Those system alert sounds might be useful sometimes,

but they can quickly become distracting in a quiet office or when you’re wearing headphones. In this comprehensive guide, I’ll walk you through several methods to silence those error sounds in Ubuntu, whether you want to disable them system-wide or just in specific applications like the terminal.

Understanding System Alert Sounds in Ubuntu

Before diving into solutions, it’s helpful to understand what causes these sounds. Ubuntu, like most modern operating systems, uses audio alerts to notify users when something goes wrong—like when you hit the end of a line in the terminal or attempt an illegal operation. These sounds are meant to be helpful, but many users find them disruptive.

Sponsored

The alert system in Ubuntu has evolved across versions. In earlier releases like Ubuntu 18.04, controls were more straightforward, while newer versions have reorganized sound settings or removed certain options altogether.

Read: Troubleshooting and Resolving Audio Issues in Ubuntu 24.04

Method 1: Disabling System-Wide Alert Sounds

If you want to silence alert sounds across your entire Ubuntu system, this approach is for you.

For Ubuntu 18.04

In Ubuntu 18.04, the process is straightforward:

  1. Go to System Settings (or Settings)
  2. Select Sound
  3. Navigate to the Sound Effects tab
  4. Find the Alert Volume slider
  5. Move the slider to OFF or toggle the switch to disable it

This single setting will eliminate those annoying beeps and boops throughout your system.

For Ubuntu 20.04 and Later

Ubuntu 20.04 and newer versions have slightly different sound settings. Some users have reported that the specific “Alert Volume” option was removed. If you don’t see this option, try this alternative:

# This command disables all event sounds system-wide
dconf write /org/gnome/desktop/sound/event-sounds "false"

This command uses dconf, a low-level configuration system, to disable event sounds across your system. After running it, system-wide alert sounds should be silenced without requiring a restart.

Method 2: Disabling Terminal Bell Specifically

If you primarily hear these error sounds while working in the terminal, you might prefer to disable them just there while keeping other system sounds intact.

Using Terminal Preferences (GUI Method)

This is the most user-friendly approach:

  1. Open your Terminal application
  2. Go to Edit > Preferences in the menu bar
  3. Select your current terminal profile (usually “Default”)
  4. Find the Terminal Bell checkbox and uncheck it
  5. Close the preferences window

This setting takes effect immediately in your current terminal window and any new ones you open.

Read: How to display your sound card details using the terminal on Ubuntu 22.04

Using Configuration Files (CLI Method)

If you prefer command-line solutions or want to set this up on remote systems, you can modify configuration files instead:

For Bash Users

Add this line to your ~/.bashrc file:

# Disable terminal bell in Bash
bind 'set bell-style none'

After saving the file, you’ll need to either source it or open a new terminal:

source ~/.bashrc

For Zsh Users

If you use Zsh as your shell, the equivalent setting goes in your ~/.zshrc file:

# Disable terminal bell in Zsh
unsetopt BEEP

Then apply the changes:

Sponsored
source ~/.zshrc

System-Wide Terminal Configuration

To disable the terminal bell for all users on the system, you can edit the system-wide configuration:

# Edit the system-wide inputrc file (requires sudo)
sudo nano /etc/inputrc

Find the line that says #set bell-style visible or similar, and change it to:

set bell-style none

If the line doesn’t exist or is commented out, add the above line at the end of the file.

Method 3: Advanced Configuration for Specific Cases

Sometimes you might encounter more complex situations where the standard methods don’t completely solve the problem.

Disabling PC Speaker Beep

On some systems, particularly older hardware, you might hear beeps coming directly from the computer’s internal speaker rather than through your regular audio output. To disable this:

# Blacklist the PC speaker module
echo "blacklist pcspkr" | sudo tee /etc/modprobe.d/nobeep.conf
# Unload the module immediately without requiring a reboot
sudo rmmod pcspkr

Custom Alert Sounds

If you don’t want to completely disable alerts but find the default sound too jarring, you can replace it with a gentler sound:

  1. Go to Settings > Sound > Sound Effects
  2. If available, select a different sound for the “Alert” event
  3. Choose something subtle like a soft click instead of the default beep

Troubleshooting Common Issues

Sound Still Persists After Configuration

If you’ve followed the methods above but still hear alert sounds:

  1. Verify settings application: Make sure changes were applied correctly by checking terminal settings or configuration files
  2. Check multiple sources: You might be hearing sounds from different applications—try disabling alerts in specific applications
  3. Desktop environment variation: Different Ubuntu flavors (Kubuntu, Xubuntu, etc.) have slightly different sound settings locations

Reverb Problem

Some users report experiencing a “reverb” effect with Ubuntu’s sound alerts—a secondary echo after the main alert sound. This is often related to sound enhancement features:

  1. Go to Settings > Sound
  2. Look for any “Enhancement” or “Effects” tabs
  3. Disable any sound enhancements or processing features

Best Practices for a Quiet Ubuntu Experience

To create a consistently quiet work environment in Ubuntu:

  • Use visual bells when possible: Many applications offer a “visual bell” option that flashes part of the screen instead of making a sound
  • Configure application-specific settings: Beyond system settings, check individual applications for their own sound settings
  • Consider a custom Ubuntu setup: If you’re setting up a new system and know you don’t want alert sounds, consider disabling them during initial configuration

Why This Matters for Productivity

As a developer who’s spent countless hours in terminal windows, I can attest that removing distracting sounds significantly improves focus and productivity. In shared workspaces, disabling these sounds is also a courtesy to your colleagues who might be disturbed by your computer’s frequent beeping.

Compatibility Notes

The methods described above have been tested on:

  • Ubuntu 18.04 LTS
  • Ubuntu 20.04 LTS
  • Ubuntu 22.04 LTS

Some settings locations may vary slightly in Ubuntu derivatives like Kubuntu, Xubuntu, or Linux Mint.

Frequently Asked Questions

Will disabling alert sounds cause me to miss important notifications?

No, visual notifications will still appear on your screen. Disabling sound alerts only removes the auditory component.

Do I need to restart my computer after making these changes?

For most methods, no restart is required. Terminal settings take effect in new terminal windows, and system sound settings usually apply immediately. Only kernel module changes (like disabling the PC speaker) might require a restart.

I’m using a different terminal emulator than the default. Will these methods still work?

The terminal preferences method will differ depending on your terminal emulator. For example, if you use Terminator or Konsole, you’ll need to check their specific preferences. However, the .bashrc and .inputrc methods should work regardless of which terminal emulator you use.

Can I temporarily enable sounds again without changing all these settings?

Yes, most of these changes can be temporarily reversed. For example, you can run bind 'set bell-style audible' in a terminal session to temporarily re-enable sounds without modifying your configuration files.

What if I want to keep alert sounds for certain applications but disable them for others?

Focus on application-specific settings rather than system-wide changes. Most well-designed applications have their own sound settings that can be configured independently.

Silencing those error sounds can make your Ubuntu experience much more pleasant, especially if you spend a lot of time working in the terminal. Whether you prefer point-and-click solutions or editing configuration files directly, there’s a method that will work for your workflow and preferences.

The post How to Turn off error sound on Ubuntu 18.04 appeared first on net2.

Ubuntu Server Admin

Recent Posts

Ubuntu 22.10 Boot Warnings: How to fix the “blacklist: Problem blacklisting hash (-13)” Boot Message in Ubuntu 22.10

If you’ve recently upgraded to Ubuntu 22.10 from version 22.04, you might have encountered an…

13 minutes ago

The Ultimate Guide to Viewing and Analyzing Core Dump Files on Ubuntu

When developing software, particularly in languages like C and C++, crashes are inevitable. The dreaded…

13 minutes ago

How to Fix phpMyAdmin Login Issues with MySQL 5.7 on Ubuntu

If you’ve recently upgraded to Ubuntu 16.04 or newer with MySQL 5.7+, you might have…

13 minutes ago

How to Fix System is Not Set Up to Build Kernel Modules Error in Ubuntu

When working with virtual machines, you’ll likely encounter the frustrating error message: “This system is…

13 minutes ago

Mastering User and Group Management in Linux: A Comprehensive Guide for IT Administrators

Managing users and groups effectively is one of the most fundamental skills for any Linux…

14 minutes ago

How to Fix “Release is not valid yet” Errors in Docker Containers When Running apt update

Have you ever been in the middle of updating your Ubuntu container with a simple…

1 day ago