Linux下关闭Shell提示音 - 漫步小者 - 博客频道 - CSDN.NET
2015-10-31 15:26
330 查看
http://blog.csdn.net/zhejiang9/article/details/5411719
当电脑对我嘟嘟嚷的时候,我真的觉得很讨厌。我常常在 shell 里面使用 Tab-补
全来节省大量的输入时间,但是我受不了扬声器没完没了的嘟嘟声!
下面就为大家介绍如何快速去除讨厌的叫声。在 shell 里面,你可以按下 crtl-g
来测试一下这个嘟嘟声是否已经去掉。
关掉所有的提示音
在 Linux 控制台下(没有 X11),你可以使用一下命令:
setterm -blength 0 (这个比较彻底,连VI中的声音也可以关掉)
将上面这句话加入/etc/profile 最后一行即可保证每次都能运行
#alternatively you can change the frequency of the beep to a
#very low value:
setterm -bfreq 10
而在 X11 下面(不管是 KDE、Gnome、XFCE 或者……) 你可以:
xset b off
对每种 shell 操作
作为一种可能的选择,你可以直接关掉某种 shell 里的提示音。
对 Bash: (VI中的声音不可以关掉)
# has to go into /etc/inputrc or .inputrc
# It will not work in a .bashrc file!
set bell-style none
对 Tcsh:
# put this into your .tcshrc file
# just tab completion beep off:
set matchbeep = never
# any beep off:
set nobeep = 1
对FreeBSD的Csh:
# put into /etc/csh.cshrc
set nobeep=1
结论
为避免误解,特此声明:以上操作只是关掉了(蜂鸣器的)嘟嘟声,你仍然可以在
你的电脑上自在的听歌。
世界清静了……
当电脑对我嘟嘟嚷的时候,我真的觉得很讨厌。我常常在 shell 里面使用 Tab-补
全来节省大量的输入时间,但是我受不了扬声器没完没了的嘟嘟声!
下面就为大家介绍如何快速去除讨厌的叫声。在 shell 里面,你可以按下 crtl-g
来测试一下这个嘟嘟声是否已经去掉。
关掉所有的提示音
在 Linux 控制台下(没有 X11),你可以使用一下命令:
setterm -blength 0 (这个比较彻底,连VI中的声音也可以关掉)
将上面这句话加入/etc/profile 最后一行即可保证每次都能运行
#alternatively you can change the frequency of the beep to a
#very low value:
setterm -bfreq 10
而在 X11 下面(不管是 KDE、Gnome、XFCE 或者……) 你可以:
xset b off
对每种 shell 操作
作为一种可能的选择,你可以直接关掉某种 shell 里的提示音。
对 Bash: (VI中的声音不可以关掉)
# has to go into /etc/inputrc or .inputrc
# It will not work in a .bashrc file!
set bell-style none
对 Tcsh:
# put this into your .tcshrc file
# just tab completion beep off:
set matchbeep = never
# any beep off:
set nobeep = 1
对FreeBSD的Csh:
# put into /etc/csh.cshrc
set nobeep=1
结论
为避免误解,特此声明:以上操作只是关掉了(蜂鸣器的)嘟嘟声,你仍然可以在
你的电脑上自在的听歌。
世界清静了……
相关文章推荐
- Linux下关闭Shell提示音 - 漫步小者 - 博客频道 - CSDN.NET
- Linux下关闭Shell提示音 - 漫步小者 - 博客频道 - CSDN.NET
- Linux下关闭Shell提示音 - 漫步小者 - 博客频道 - CSDN.NET
- On Creating New Project in VS2013: Failed to Initialize the Powershell Host
- Linux脚本编程:Bash shell脚本的大括号
- Shell脚本经典之Fork炸弹
- SHELL脚本执行方式
- windows程序托盘图标以及消息提示--基本知识(Shell_NotifyIcon)
- windows程序托盘图标以及消息提示--基本知识(Shell_NotifyIcon)
- 什么是shell,shell基础由浅入深,常用的shell命令、用法、技巧
- shell模拟并发执行
- shell编程之if判断的总结
- 终极 Shell——ZSH
- linux下提示bash:command not found
- Linux useradd命令执行,出现 bash:useradd:command not found
- xshell上自动跳转登录多台机器
- shell find和xargs学习(七)
- 修改~/.bashrc文件 改编终端颜色
- 发送html格式的邮件(shell+python)
- 脚 本 练 习 题(三)