如何在Windows 10上禁用WSL中的可视和音频铃声/蜂鸣声?


当前回答

要在远程机器中禁用ssh时的哔哔声,只需创建相同的~/。输入和~/。远程计算机上的Vimrc文件,以阻止SSH本身发出哔哔声。

每个文件的内容请看@Nemo的回答。

其他回答

除了jgr208说的,你可能有一个~/。配置文件已经和~/。Bash_profile可能不存在,我就是这种情况。

在这种情况下,将setterm - length 0添加到.profile中。

如果你创建了.bash_profile,你的.profile将被忽略,Windows在那里写的任何东西都将无法工作。

To disable the beep in bash you need to uncomment (or add if not already there) the line set bell-style none in your /etc/inputrc file. Note: Since it is a protected file you need to be a privileged user to edit it (i.e. launch your text editor with something like sudo <editor> /etc/inputrc). To disable the beep and the visual bell also in vim you need to add the following to your ~/.vimrc file: set visualbell set t_vb= To disable the beep also in less (i.e. also in man pages and when using "git diff") you need to add export LESS="$LESS -R -Q" in your ~/.profile file.

我发现TedMilker的解决方案起作用了,但每次重新启动时,我都需要重新调整音量混合器。为了让它永久存在,我在Windows应用程序音量和设备首选项中调整了音量级别。

摘自这篇文章:

设置/系统/声音/应用程序音量和设备首选项

将控制台窗口主机设置为零。

(你可能需要在控制台窗口中按Tab / Backspace键来触发铃声,然后控制台窗口主机滑块出现。)

在“系统声音”中将“临界停止”替换为一个静默的wave文件1。

仅仅把声音完全去掉对我来说没用。显然在这种情况下使用了一些默认的声音。

(感谢。感谢SuperUser的发现)。

在Windows终端设置中,选择配置文件,然后点击“高级”>“铃声通知”

然后关掉它: