Turn off the beep of the Linux backspace and VI (alarm sound)

Source: Internet
Author: User
Tags root access

Online Introduction:vi/etc/inputrc, and then remove the set Bell-style none before the comments, modified, you need to exit the current shell, login again to take effect. At this time, you can use the crtl-g to test. But such a practice can only command line error alarm sound, and with the VI, less and man editing when the beep will beep.

In fact, the root of the problem is not the sound card issued, but the motherboard buzzer, so can not be closed by the speaker to solve. This ring is because Red Hat Enterprise LINUX is installed and loaded with the PCSPKR kernel module By default, to turn off system bells you can use the root command to remove the PCSPKR module by executing the following command:

Rmmod PCSPKR
If you want to reopen it, you can use the following command:
modprobe PCSPK

Of course, the above method is only temporary effect, after restarting Beep still, completely shut down the Beep method as follows:

If you are using bash as the shell, at the end of the ~/.BASHRC add
Setterm-blength 0
Xset-b

This method is permanent, but not for all users, because it is to change their home directory of the ~/.BASHRC file, which for those who have root access to the wood can be set, the wood has to be permanent and for all users of the method? The answer is, if you have to log in as root, and then greet the following method:

Execution at the command line:echo "Rmmod pcspkr" >>/etc/rc.d/rc.local

This command means to append one to the /etc/rc.d/rc.local script, the content is:rmmod pcspkr. The purpose of this is to allow the system to remove the PCSPKR kernel module each time the boot, and rc.local generally regardless of whether you in the 3 startup mode or 5 startup mode, the service script will be executed, you put this PCSPKR Kernel module deleted, that no matter what mode you are in, to what user login, nature will not be able to load, it will not send the annoying beep beep

Original: http://blog.chinaunix.net/uid-15007890-id-3236706.html

Turn off the beep of the Linux backspace and VI (alarm sound)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.