如何关闭linux beep的beep声

博客访问: 453822
博文数量: 40
博客积分: 3063
博客等级: 少校
技术积分: 565
注册时间:
IT168企业级官微
微信号:IT168qiye
系统架构师大会
微信号:SACC2013
分类: LINUX
Ubuntulinux下出错的时候,系统的扬声器会发出难听的声音。  可以通过下面的命令关掉它。  rmmod pcspkr  如果你想重新打开它,可以使用下面的方法。  modprobe pcspkr  当然,上面的方法只是临时起效,重新启动后beep依旧,彻底关掉beep的方法如下:  如果用的是bash作shell,在~/.bashrc的最后添加   setterm -blength 0  xset -b  在 console 下: setterm -blength 0  在 X-win 的 terminal 下: xset -b上述方法我试过 很管用关闭Linux下Shell终端嘟嘟声和vi中错误提醒的Beep音(zz) 13:11很有用的东西Q. This beep sound is annoying under Linux, how do I disable it forever?A. To be frank there are many ways exists - to turn off terminal beep. Use any one of the following method as per your requirements.If you are using Gnome terminala) Open Gnome terminalb) Click on Settings > Preferences > Silence Terminal BellOr Click on General Tab -> General -> Un-Check Terminal bell optionIf you are using xtermOpen ~/.xsession file (i.e. /home/you/.xession)$ cd$ vi .xessionAppend following linexset b offSave and close the file.If you are using bashOpen you ~/.inputrc file (i.e. /home/you/.inputrc file$ cd$ vi .inputrcAppend following line:set bell-style noneSave and close the file.If you just want to turn off beep for VIM text editor:Open vim config file ~/.vimrc (i.e. /home/you/.vimrc)$ cd$ Vi .vimrcAppend following lineset vbSave and close the file.If you are using Ubuntu Linuxa) Click on Applications > Accessories > Terminalb) Now click on Edit Menu > Current Profilec) Click on General Tab > General > Remove check box (Terminal bell)引用自:http://www.cyberciti.biz/faq/how-to-linux-disable-or-turn-off-beep-sound-for-terminal/我自己尝试并且成功关闭终端的方法:在 shell 里面,你可以按下 crtl-g 来测试一下这个嘟嘟声是否已经去掉在终端(无X11)可以:setterm -blength 0#alternatively you can change the frequency of the beep to a very low value:setterm -bfreq 10而在 X11 下面(不管是 KDE、Gnome、XFCE 或者……) 你可以:xset b off对 Bash:# 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我自己尝试并且成功关闭了vi中的beep声的方法:在~/.vimrc里面添加一行:set vb保存退出即可搞定
阅读(6121) | 评论(0) | 转发(0) |
相关热门文章
给主人留下些什么吧!~~
请登录后评论。:转载时请以超链接形式标明文章原始出处和作者信息及本声明
新装的的debian Linux开机关机都有嘀的一生, 每次都听的心惊胆战的.
今天终于关掉了, 就在/etc/modprobe.d/blacklist下面加上一行blacklist pcspkr就可以关掉beep生了.
以后再也不用担心开机被吓到了. 哈哈
引用地址:
:Aporia::如何停止XP上PC喇叭的Beep声
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。}

我要回帖

更多关于 linux 关闭声音 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信