fedora下关掉那讨厌的beep beep beep

本文介绍如何在Linux系统中禁用蜂鸣器。包括在纯文本控制台下使用setterm命令调整蜂鸣器长度为0或频率极低的方法,以及在X11环境下使用xset命令关闭蜂鸣器的具体步骤。此外还提供了针对Bash和Tcsh shell环境直接禁用蜂鸣器的配置方案。
在网上找了几个方法,都没有效果,最后在http://www.linuxfocus.org上找到了答案

Beep globally off

In a plain linux console (no graphical X11) you can turn the beep off with the command:
setterm -blength 0

#alternatively you can change the frequency of the beep to a
#very low value:

setterm -bfreq 10
When working under X11 (no matter if KDE, Gnome, XFCE, or ... is used) you turn off the beep with:
xset b off
 

Beep off on a per shell basis

Alternativley you can turn off the beep directly in the shell.

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
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值