将/etc/inputrc中的set bell-style none 前的#去掉,之后重启系统即可。
不过这种方法试了并不见效,不过思路是对了,bell-style的取值范围是:none, visible, audible,想要把报警声去掉应该是
将/etc/inputrc中的set bell-style visible前的#去掉,如果没这句话,可以自己添上。
去掉linux报警声音
其实内核模块pcspkr是驱动系统喇叭的模块,把它禁用了就行了。在命令行上打入:sudo modprobe -r pcspkr就行了。最好的办法是加入到blacklist,方法如下:在/etc/modprobe.d/blacklist中,加入blacklist pcspkr即可再次测试,没有讨厌的系统喇叭声音了。
1>shell报警声
方法1
#vi /etc/inputrc
# do not bell on tab-completion
set bell-style none
方法2
#echo "set bell-style none" >> ~/.bashrc
注:上边只是去掉shell中的tab报警声,如果还有其它的报警声可以用下面命令:
setterm -blength 0
或将其加入到/etc/bashrc中。
2>gdm登录报警
#vi /etc/gdm/custom.conf
[greeter]
Browser=true
SoundOnLogin=false
或者在 terminal下去行下面命令
1:rmmod pcspkr
2 :xset b off
.- 上一篇:linux下无线网络配置方法
- 下一篇:Linux系统中服务优化详解