The ping manual says that ping -a will generate audible pings, but when I try this no sound is made.

What am I doing wrong?


From looking at the source, ping produces a bell by printing the ASCII bell char '\a', which is doing nothing, probably because the system beep is disabled.

You can manually try to produce the bell with:

echo -e "\a"
  • That's helpful. I'll troubleshoot the bell.
    – ændrük
    Dec 6 '10 at 7:11
  • This is likely a Compiz bug. If you disable Desktop Effects, you will probably hear the pings. Jan 20 '11 at 7:21
  • 2
    Yep, here is your bug report: bugs.launchpad.net/ubuntu/+source/compiz/+bug/537703 Jan 20 '11 at 7:31
  • 2
    No ping or audio from the echo command on CrunchBang Linux (OpenBox) with no compiz.
    – SabreWolfy
    Dec 7 '11 at 13:41
  • @DylanMcCall thank you for providing a link to the relevant bug report. I added me to the "this effects me". I hope this gets fixed some time. Wow, in ten days this bug report is seven years old!
    – guettli
    Mar 1 '17 at 6:09

compiz "eats" the sound and this is a reported bug, so it won't work in the graphical interface in standard compiz ubuntu sessions. (see this bug report, thanks to Dylan McCall comment for the URL).

If you really need the functionality, you could run your ping from a physical console (Ctrl+Alt+F1). But don't forget:

sudo modprobe pcspkr

As module pcspkr isn't loaded at boot time and actually drives the old PC speaker you should have in your computer.

You can add it to /etc/modules if you think you'll need it at a regular basis as this will have the effect to tell the system to load it at boot time.

Note: as it's a compiz issue, if you are using gnome-fallback session you shouldn't experience the issue. If this is the case, check your terminal program for options related to console bell.


1 says it's missing a sound file. You can add it with the following command:

  pactl upload-sample /usr/share/sounds/gnome/default/alerts/glass.ogg bell.ogg

For a permanent solution add the command to ~/.xprofile


Because the question is not specified for Unity only, I'll make a little hint about KDEs Konsole. You just should specify a sound for a "Bell in Visible Session" which is under Settings -> Configure Notifications. For example I'm using sounds from /usr/share/sounds/ section. I don't remember is there such an option in Ubuntu's Unity terminal.


In my case I am using KDE in Kubuntu. I had to tick a checkbox:

  1. Search applications for Notifications, subtitle is Event Notifications and Actions
  2. Then under Applications select Konsole.
  3. Then select Configure Events...
  4. Then highlight Bell in Non-Focused Session
  5. Then tick next to Play a sound
  • 1
    Thanks, this answer is suitable for recent Plasma versions (mine is 5.22.5). Still haven't figured out how to do the same under Terminator, though. But thanks, at any rate. Jan 10 at 9:47

In my case, audible bell was disabled because of xset -b in my ~/.xsession file and could be re-enabled with xset b.


If you are using Terminator as terminal on Ubuntu 18.10, left-click the Terminator, select preferences/profiles, and there is the audible beep option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.