Disable buzzer and clear junk files in Linux

Source: Internet
Author: User

Maybe you will encounter a situation like me, every time you use a Linux terminal, when you hear a "beep" sound, I have the urge to tear down my chassis and drag down the built-in beep device. Click "tick" when you press Tab, and click "tick" when you press space. Every wrong operation in vi will make the machine laugh at you with a harsh "tick. Now, it's time to show who is the real master.

Maybe you haven't realized that this sound is not from an external audio output device of the system, but from a sound device inside the machine that I know is controlled by the BIOS, so next I will explain how to turn this little thing off.

Temporary solution

Sudo rmmod pcspkr

For Debian/Ubuntu users, you only need to open your terminal and run the above command. For Linux users in CentOS/Redhat/RHEL/Fedora, Log On As root and run rmmod pcspkr.

Permanent solution

For Debian/Ubuntu systems, run the following command as root:
Sudo echo "blacklist pcspkr">/etc/modprobe. d/blacklist

For CentOS/Redhat/RHEL/Fedora systems, run the following command as root:
Echo "alias pcspkr off">/etc/modprobe. conf

Turn off the Linux bell

1. Close the bell in shell.
Disable vi/etc/inputrc
Add set bell-style = none
Set bell-style none
Set bell-style off
Disable User vi ~ /. Inputrc
Add set bell-style = none

2. Disable the rings in vi and vim.
Vi/etc/vimrc
Vi/etc/virc
Open the above two files and add
Set vb t_vb =

In the X Window System, you can use the xset command as follows:
Xset B off
(Enter xset and press enter to obtain the xset Command Option)

In the linux console, how can I disable the terminal RING:

This is because we have recently conducted experiments on linux servers, and there is no GUI, only CUI. When you use the TAB to complete the command, it is always "complete .." Sound, sound too loud, want to turn off. Finally, this method is found, and the terminal bell can be switched off on Centos and ubuntu.
You can use setterm to disable the terminal RING sound, as shown below:
Code 7.1: Use setterm
# Setterm-blength 0
If you want to close the terminal bell at startup, add this command to/etc/conf. d/local. start. However, this only disables the ring tones of terminals currently in use. If you want to disable logging on other terminals, redirect the output of this command to the target terminal, as shown below:
Code 7.2: Use setterm (bis)
# Setterm-blength 0>/dev/vc/1
You need to replace/dev/vc/1 with the terminal that you want to disable the ring tones.

After logging on to the console, a large number of tabs will be used to automatically complete the operations below the shell prompt. At this time, the machine's buzzer will be non-stop. My colleagues in the office thought my qj computer was really annoying!

You can use the setterm command to set the length of this doodle sound.

Setterm-blength 0

The value can be 0-1000. You can use setterm to check its usage. It is not enough to enter the preceding command. The next restart will have a sound of pivoting. To solve this problem, add the above command to/etc/rc. d/rc. local.

Add:
/Etc/inputrc contains a statement

# Do not bell on tab-completion
# Set bell-style none

Here, if you remove the annotator before the set, you only need to remove the automatically completed tab sound, rather than completely eliminate other sounds (such as Backspace and vi) in the console)

The above only disables the sound of the buzzer and does not affect the sound of the Speaker. play music and video do not have any side effects.

Delete updated and installed files

Yum remove

1. Clear the software packages under the cache directory (/var/cache/yum ).
Command: yum clean packages

2. Clear headers under the cache directory (/var/cache/yum)
Command: yum clean headers

3. Clear the old headers under the cache directory (/var/cache/yum)
Command: yum clean oldheaders

4. Clear the software packages and old headers in the cache directory (/var/cache/yum ).
Command: yum clean, yum clean all (= yum clean packages; yum clean oldheaders)

Delete junk files

1. Delete all files in the/tmp/directory

2. Delete all files in the/var/log/directory.

3. $ HOME/. mozilla/firefox directory

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.