Linux控制台终端下设置关闭声音的方法


Linux控制台下(没有 X11)

设置声音的长短:setterm -blength 0

后面的取值可以是0-1000,可以用setterm看看它的用法。

关闭Tab健的声音:set bell-style none

/etc/inputrc里面有一条语句:
#do not bell on tab-completion
#set bell-style none

对每种 shell 操作,作为一种可能的选择,你可以直接关掉某种 shell 里的提示音。

# has to go into /etc/inputrc or .inputrc
# It will not work in a .bashrc file!
set bell-style none

在 X11 下面(不管是 KDE、Gnome、XFCE 或者……)

xset b off

或者:
打开终端-->Edit-->Profiles-->Edit-->去掉Terminal bell前面的勾。

对 Tcsh

# put this into your .tcshrc file

# just tab completion beep off:
set matchbeep = never
# any beep off:
set nobeep = 1

相关内容