Thank you all for the good answers - the one by Kenny was easiest for me.
I just want to note some things that might find others find this question/answer page, since the alert sound might be going off under surprising circumstances, far away from where you're generating it, and be very annoying to people.
E.g you may use a chromebook, in dev mode, via the crosh terminal, to ssh in to a remote host. That host, of course, could be running any OS (Linux, Windows, MacOS etc). You can trigger the terminal bell / alert, e.g. in a shell window, at the beginning of the line, by hitting backspace, because there is no character to be erased. When you do, all the virtual terminals connected via ssh (and tmux etc) will get the alert, and any of them might be configured to make the alert sound. This is how bad (and mysterious) it can get:
- On chromebook (in dev mode) open Terminal / secure shell (with the crosh prompt)
- Connect (via shell command) to bash shell
- Connect via ssh command to another host
- Notice that backspace at the beginning of a line triggers the alert on the chromebook
- Of course, hitting backspace directly on the host that you've ssh'd in to will also trigger the alert sound.
- Leave your chromebook alone for a while, letting the screen blanks. But still, even though it look like it is off or in sleep mode, alerts triggered remotely still make noise on it, for a while at least!
If you actually close the lid of the chromebook, it will really go to sleep and won't make noise any more. Or if you disable the audible alert as described in other answers.