The system beep can be really annoying sometimes. In Debian and Debian-based distributions like Ubuntu, you can blacklist it:
sudo nano /etc/modprobe.d/blacklist
Add the following at the end of the file:
#speaker beep
blacklist pcspkr
Reboot and you’re all done. If you want to disable the system beep on the spot, you can do it with
sudo rmmod pcspkr
Or a slightly quicker way.
su
echo blacklist pcspkr >> /etc/modprobe.d/blacklist