On Windows systems (XP or Vista) you can play a beep using the Win32 MessageBeep operating system function.
On Windows platforms you can also use the following command:
You can obtain ^G by pressing together the control key and the "g" key on your keyboard.
On Linux you can obtain the beep at least in two different way:
# echo %'\007'
# echo -e "\a"
In Ubuntu you could add a beep command using apt-get command:
# apt-get install beep
But beep adds a lot of feature and not only the simple beep. With beep you can configure a lot of parameters like:
for example the following command generate 3 beeps at 300 Hz of frequency
# beep -f 300 -r 3