1. Turn off the PC Speaker Beep (the most common cause)
On most Linux desktop computers, that beep comes from the PC speaker – a tiny speaker on the motherboard. It's not your sound card. This is the first thing to check.
Open a terminal. Type this command and hit Enter:
xset b off
After running it, try something that causes an error. For example, type ls nonexistent. No beep? Good. But this only works for the current session. When you restart, the beep comes back.
To make it permanent, you need to add that command to your startup file. Which one depends on your desktop environment.
For GNOME (Ubuntu, Fedora default)
- Open your home folder. Press Ctrl+H to show hidden files.
- Look for a file called
.profile(or.bash_profileif you use Bash login shells). - Double-click it. It opens in a text editor. At the bottom, add this line:
xset b off
- Save the file. Close it.
- Log out and log back in. The beep should stay off.
If you use KDE Plasma or Xfce, the same trick works – just add the line to .profile. Some users put it in .xinitrc or .xession. If .profile doesn't work, try .bashrc instead.
After adding it, test by opening a new terminal window. Type a wrong command. No beep? You're done.
2. Disable the terminal bell in your terminal emulator
Sometimes the beep comes from the terminal app itself, not the PC speaker. This happens in GNOME Terminal, Konsole, and others.
The fix is in the terminal's settings. Let's go through the most common ones.
GNOME Terminal (default on Ubuntu, most Linux Mint)
- Open GNOME Terminal. Click the hamburger menu (three lines) in the top-right corner.
- Choose Preferences.
- On the left side, pick your current profile (usually named "Unnamed" or "Default").
- Go to the Text tab.
- Look for a checkbox that says Terminal bell – uncheck it.
- Close the preferences window.
After you uncheck it, test with a wrong command. Should be quiet now.
Konsole (KDE default)
- Open Konsole. Click Settings > Edit Current Profile.
- Go to the General tab.
- Under Bell, change it to None (or uncheck all options).
- Click Apply then OK.
Xfce Terminal
- Open Xfce Terminal. Click Edit > Preferences.
- Go to the Appearance tab.
- Uncheck Audible bell.
- Close the window.
This fix is per-profile. If you use multiple profiles, repeat for each one.
3. Mute the terminal bell in your desktop sound settings
Some Linux desktops play the system bell through your speakers. This is common in newer GNOME versions (3.30+). The fix is in the sound settings.
For GNOME (Ubuntu 18.04+, Fedora 30+)
- Open Settings from the system menu (top-right corner).
- Click Sound.
- Look for Sound Effects – turn it Off.
- Close settings.
This mutes all system sounds, including the terminal bell. If you still hear a beep, it's the PC speaker (see cause #1).
For KDE Plasma
- Open System Settings.
- Go to Notifications.
- Find Terminal Bell in the list on the left.
- Uncheck Play a sound.
- Click Apply.
This works for most apps that use the system bell, like bash and vim.
Quick-reference summary table
| What's causing the beep | Quick fix | Permanent fix |
|---|---|---|
| PC speaker beep (motherboard speaker) | xset b off in terminal |
Add xset b off to .profile |
| Terminal emulator's bell setting | Uncheck "Terminal bell" in Preferences | Adjust your terminal profile settings |
| Desktop sound theme plays the bell | Turn off "Sound Effects" in Settings | Disable system bell in Notifications |
Try these in order – cause #1 is the most common. If you still hear a beep after trying all three, you might have a custom terminal app or a weird configuration. Check if you have bell-style set in your .bashrc or .inputrc – that can also trigger the beep. Remove any line that says set bell-style visible or set bell-style none – setting it to none stops the visual bell, not the sound.