临时的方案
sudo rmmod pcspkr
对于CentOS/Redhat/RHEL/Fedora系统,使用root身份执行:
rmmod pcspkr
一劳永逸的方案
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 off