Linux關閉蜂鳴聲

 

 

sudo echo "blacklist pcspkr" >> /etc/modprobe.d/blacklist

對於CentOS/Redhat/RHEL/Fedora系統,使用root身份執行:
echo "alias pcspkr off" >> /etc/modprobe.conf

 

還有另一種方法,就是在/etc/inputrc文件中把
set bell-style none
前的註釋去掉,改成
set bell-style offide

--------------------------------------------------------------------------------------input

執行下列代碼,不須要全執行,任意一行就能夠了。
setterm -bleng 0
setterm -blength 0
xset b off
===========
下面另外一種方法
臨時的方案
sudo rmmod pcspkr
對於Debian/Ubuntu的用戶來講,只要打開你的終端跑一下上述的命令就能夠了。對於CentOS/Redhat/RHEL/Fedora的Linux用戶,則須要以root身份登陸而後執行rmmod pcspkr
一勞永逸的方案
對於Debian/Ubuntu系統,使用root身份執行:
sudo echo "blacklist pcspkr" >> /etc/modprobe.d/blacklist
對於CentOS/Redhat/RHEL/Fedora系統,使用root身份執行:
echo "alias pcspkr off" >> /etc/modprobe.conf ......
 it

相關文章
相關標籤/搜索