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.
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:
- Go to System Settings (or Settings)
- Select Sound
- Navigate to the Sound Effects tab
- Find the Alert Volume slider
- 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:
- Open your Terminal application
- Go to Edit > Preferences in the menu bar
- Select your current terminal profile (usually “Default”)
- Find the Terminal Bell checkbox and uncheck it
- 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:
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:
- Go to Settings > Sound > Sound Effects
- If available, select a different sound for the “Alert” event
- 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:
- Verify settings application: Make sure changes were applied correctly by checking terminal settings or configuration files
- Check multiple sources: You might be hearing sounds from different applications—try disabling alerts in specific applications
- 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:
- Go to Settings > Sound
- Look for any “Enhancement” or “Effects” tabs
- 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.
Discover more from Ubuntu-Server.com
Subscribe to get the latest posts sent to your email.