Sometimes it is necessary to be more quiet, when using the shell. For example, when working in groups, or if you're just annoyed of the beep.
The console beep can be effectively disabled by disabling the pcppi driver in the kernel. This is done during kernel configuration by finding and commenting out the lines referring to the pcppi(4) driver and its attached child devices in the kernel configuration file, e.g. "sysbeep at pcppi" on i386. See the NetBSD Guide for information on compiling customised kernels.
In the event the user must use a precompiled kernel that has the sysbeep device enabled, the pcppi driver and attached devices can be interactively disabled at boot time, via userconf(1), as follows:
Select "Drop to boot prompt" at the boot menu.
Enter "boot -c" to begin interactive boot using userconf(1).
Disable the pcppi driver and its attached devices using the "disable" command. Type "?" or "help" at the "uc>" prompt for a list of the userconf(1) commands and their syntax. You may find the device numbers of "sysbeep at pcppi" and associated pcppi device drivers using the "list" command. Type "quit" when done disabling the pcppi devices.
These methods should work on any hardware.
Alternatively, there are several ways to disable the beep after the system has booted and the user has logged in, as described below.
On the console you can set the volume of the console beep with.
To display the current volume enter:
# wsconsctl bell.volume
You can control the volume setting different values. To turn the volume off enter:
# wsconsctl -w bell.volume=0
This may not work on every hardware. The solution is to set the the bell pitch to 0 Hz.
# wsconsctl -w bell.pitch=0
The bell pitch defaults to 1500 Hz. Sometimes a lower value is more comfortable. Just keep trying.
If you are working with X11, you can turn off the console beep using the command.
If you are using modular Xorg you need to install, it is under x11/xset.
To turn the console beep off enter:
$ xset b off
To turn it back on, enter:
$ xset b on
You can also set the volume and the pitch of the beep. This is not always supported, depending on the hardware.
However if you want to set volume and pitch you can do something like that:
$ xset b 10 1000 100