如何消去linux的错去提示音?

如何消去linux的错去提示音?,第1张

在 shell 里面,你可以按下 crtl-g 来测试一下这个嘟嘟声是否已经去掉。

关掉所有的提示音

在 Linux 控制台下(没有 X11),你可以使用一下命令:

setterm -blength 0

#alternatively you can change the frequency of the beep to a

#very low value:

setterm -bfreq 10

而在 X11 下面(不管是 KDE、Gnome、XFCE 或者……) 你可以:

xset b off

对每种 shell *** 作

作为一种可能的选择,你可以直接关掉某种 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

另:在控制台下,可以通过修改/etc/inputrc,永久关掉它,但只对当前控制台生效。

#vim /etc/inputrc

添加一行

set bell-style none

不知道你的什么linux

我的redhat 5.4,其他版本的也差不多吧

打开

vim /etc/inputrc

修改:

#set bell-style none

改成

set bell-style none

如果是VM下,有蜂鸣声,那就要用其他方法


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/8521270.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-17
下一篇 2023-04-17

发表评论

登录后才能评论

评论列表(0条)

保存