How can I generate audio bell in xterm
type terminal?
Asked
Active
Viewed 6,553 times
3 Answers
16
Simple, print the bell character. In Python:
print('\a')
From bash shell:
echo $'\a'
Note that on some terminals, the bell can be disabled. In others, the bell can be replaced with a visual bell in the shape of a flashing screen background.

Yuval Adam
- 161,610
- 92
- 305
- 395
2
For a simple beep, print "\a".
The Control Codes are listed on this page, these are all the characters that should make a terminal perform an action.

Serdalis
- 10,296
- 2
- 38
- 58