如何幹掉機器的嘟嘟聲
This beep sound is annoying under Linux, how do I disable it forever under Debian / Fedora / RHEL / Red Hat / Ubuntu Linux?
There are diffrent methods to disable / turn of beep under Linux (turn off terminal beep). Use any one of the following method as per your requirements.
Ubuntu Linux / Gnome Terminal
a) Open Gnome terminal
b) Click on Settings > Preferences > Silence Terminal Bell
Alternatively, Click on General Tab -> General -> Un-Check Terminal bell option
If you are using xterm
Open ~/.xsession file (i.e. /home/you/.xession)$ cd
$ vi .xession
Append the following line:xset b off
Save and close the file.
If you are using bash shell
Open you ~/.inputrc file (i.e. /home/you/.inputrc file$ cd
$ vi .inputrc
Append following line:set bell-style none
Save and close the file.
If you just want to turn off beep for VIM text editor
Open vim config file ~/.vimrc (i.e. /home/you/.vimrc)$ cd
$ Vi .vimrc
Append following lineset vb
Save and close the file.
If you are using Ubuntu Linux
a) Click on Applications > Accessories > Terminal
b) Now click on Edit Menu > Current Profile
c) Click on General Tab > General > Remove check box (Terminal bell)
You can also remove the driver, enter:$ sudo modprobe -r pcspkr
Append the following line to your /etc/modprobe.d/blacklist so that beep remains off after the system reboot:blacklist pcspkr
FreeBSD Disable Bell / Beep ( Hardware beep )
I know how to disable beep sound under Linux, but the settings are not working under FreeBSD laptop. How do I disable beep sound under FreeBSD operating system?
To enable or disable bell use MIB hw.syscons.bell under FreeBSD operating systems. Type the following command to disable for current session:
# sysctl hw.syscons.bell=0
Make sure settings remains same after you reboot the laptop, enter:
# echo "hw.syscons.bell=0" >> /etc/sysctl.conf
原文在此:http://www.cyberciti.biz/faq/how-to-linux-disable-or-turn-off-beep-sound-for-terminal/
http://www.cyberciti.biz/faq/turning-off-freebsd-system-hardware-beep-linux/
没有评论:
发表评论