TechBuzzPro

How to Disable the Beep in WSL Terminal on Windows 10

· 6 min read · Windows & PC

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To stop the WSL terminal from beeping, you need to silence the bell in both the Linux shell and the Windows terminal host. The quickest fix is to add set bell-style none to your shell's readline configuration (usually ~/.inputrc), then turn off the terminal's audible bell in the Windows Terminal or console properties. This guide covers both layers so the beep stops no matter which terminal you use.

What You'll Need

  • A Windows 10 PC with WSL installed (WSL 1 or WSL 2 both work).
  • Access to your WSL Linux distribution (Ubuntu, Debian, etc.) via Windows Terminal, Command Prompt, or PowerShell.
  • A text editor inside WSL such as nano or vim (usually preinstalled).
  • Optional: Windows Terminal installed from the Microsoft Store for the easiest bell settings.

Step-by-Step

  1. Open your WSL terminal. Launch Windows Terminal, then select your WSL distribution from the dropdown, or run wsl from Command Prompt or PowerShell.
  2. Check your shell. Run echo $SHELL. If it ends in bash or zsh, the readline method below applies. If it is fish or another shell, skip to the terminal-host step, because readline settings do not affect it.
  3. Create or edit the readline config file. Run nano ~/.inputrc. If the file does not exist, nano creates it when you save.
  4. Add the bell setting. Type this line exactly: set bell-style none. This tells readline to never emit the terminal bell for tab completion, history search, or invalid keystrokes.
  5. Save and exit. In nano press Ctrl+O, then Enter, then Ctrl+X. In vim, type :wq and press Enter.
  6. Reload the setting. Run source ~/.inputrc or simply close and reopen the terminal. Test by pressing Tab on an empty prompt or typing an invalid command; the beep should be gone.
  7. Disable the bell in Windows Terminal (if you use it). Open Windows Terminal, click the dropdown arrow, and choose Settings. Select your WSL profile under Profiles, scroll to Advanced, and turn off Bell notification style or set it to None. Labels can differ slightly by Windows Terminal version, so look for the bell-related option in the profile's advanced settings.
  8. Disable the bell in the legacy console (if you use conhost). Right-click the title bar of the WSL window and choose Properties. On the Options tab, look for an audible bell or notification setting and turn it off. If your Windows 10 build does not show that option, the readline change alone usually silences WSL beeps.
  9. Test in a fresh session. Close all terminal windows, open a new WSL session, and try the actions that used to beep: pressing Tab with no match, holding Backspace at an empty prompt, and pressing Ctrl+G. If silence holds, you are done.

Common Mistakes

  • Editing the wrong file. The setting belongs in ~/.inputrc, not ~/.bashrc. Putting it in .bashrc as a shell command will cause errors because set bell-style is a readline directive, not a shell builtin.
  • Forgetting to reload. Changes to ~/.inputrc only apply to new shells unless you run source ~/.inputrc or use bind -f ~/.inputrc.
  • Only fixing one layer. If Windows Terminal still has its bell enabled, some events (like a program writing a bell character to the terminal) can still produce a sound even when readline is silent.
  • Assuming it works for every program. Readline settings cover bash and other readline-based tools, but full-screen programs like vim or less may have their own bell settings. You may need to add set belloff=all in vim or --no-bell style options where available.
  • Using the wrong shell syntax. If you use zsh, the readline file is still read by default in many setups, but zsh users often configure bells through zsh options instead. Check your shell before assuming the fix applies.

Tips

  • To silence the bell for a single session without editing files, run bind 'set bell-style none' in bash.
  • If you want a visual flash instead of sound, set set bell-style visible in ~/.inputrc. The terminal will blink rather than beep.
  • Keep a backup of ~/.inputrc before editing if you have custom key bindings there.
  • Windows Terminal settings are stored as JSON; if the graphical settings editor is confusing, you can edit the profile's bellStyle value directly, but the GUI is safer for most users.
  • Test changes in a new tab rather than the current one to avoid confusion about whether the setting loaded.

Troubleshooting

If the beep persists after both steps, work through these checks in order.

  1. Confirm the file was saved. Run cat ~/.inputrc and verify the line set bell-style none appears exactly once.
  2. Check which shell is actually running. Run ps -p $$. If the shell is not bash or another readline-based shell, the readline fix will not apply; configure the bell in that shell's own settings.
  3. Test outside WSL. Open a plain Command Prompt and press Tab repeatedly. If you hear beeps there, the sound is coming from Windows itself, not WSL, and you should check Windows sound settings or the terminal host's bell option.
  4. Try a different terminal host. Run wsl from Command Prompt instead of Windows Terminal. If the beep disappears, the remaining issue is in Windows Terminal's profile settings.
  5. Check for shell startup overrides. Some dotfiles or frameworks reset readline settings. Search your ~/.bashrc and ~/.bash_profile for lines that call bind or modify INPUTRC.
  6. Restart WSL. From PowerShell, run wsl --shutdown, then reopen your terminal. This clears any stuck terminal state without deleting data.

If none of this works, the beep may be generated by a specific application rather than the shell. Check that application's own bell or notification settings; many CLI tools have a quiet or no-bell flag.

Frequently Asked Questions

Does disabling the bell affect tab completion or other features?

No. set bell-style none only suppresses the audible signal. Tab completion, history search, and key bindings continue to work normally.

Will this setting survive WSL updates or restarts?

Yes. The change lives in your Linux home directory, which persists across restarts and most updates. Only removing the file or resetting the distribution would undo it.

Can I disable the beep only for a single command?

Yes. Prefix the command with bind 'set bell-style none'; in bash, or run bind 'set bell-style none' in the current shell before running the command. The change lasts until you close that shell.

Why does the beep still happen in vim or less?

Those programs manage their own bell behavior. In vim, add set belloff=all to your vimrc. In less, the bell is usually tied to the terminal, so the host-level fix should cover it.

Does this work on WSL 2 as well as WSL 1?

Yes. The readline configuration and terminal host settings are independent of the WSL version, so the same steps apply to both.

Is there a Windows setting that turns off all terminal beeps at once?

Windows does not offer a single global switch for terminal bells. You need to configure each terminal host (Windows Terminal, Command Prompt properties) and the shell inside WSL separately, which is what the steps above do.