You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何禁用VS Code终端命令执行结果的提示音?

禁用VS Code终端Enter键提示音的方法

以下是几种可行的解决方案,按操作便捷性排序:

1. 通过VS Code图形化设置关闭

  • 按下 Cmd+, 打开VS Code设置面板
  • 在顶部搜索框输入 terminal bell
  • 取消勾选 Terminal > Integrated: Enable Bell 选项
  • 将 Terminal > Integrated: Bell Style 设置为 none

2. 直接修改settings.json配置

  • 按下 Cmd+Shift+P 打开命令面板,输入 Preferences: Open Settings (JSON) 并回车
  • 在配置文件中添加或更新以下内容:
"terminal.integrated.enableBell": false,
"terminal.integrated.bellStyle": "none"
  • 保存文件后设置立即生效

3. 检查并修改Shell配置

由于iTerm2无此声音,可能是VS Code使用的Shell配置差异导致:

  • 打开Shell配置文件(zsh用户编辑 ~/.zshrc,bash用户编辑 ~/.bashrc)
  • 添加对应配置:
    • zsh:unsetopt BEEP
    • bash:set bell-style none
  • 保存后执行 source ~/.zshrc(或对应配置文件),重启VS Code终端即可

内容的提问来源于stack exchange,提问作者Julian20151006

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.13 20:52:08