How to play notification sound on the command line
The following bash script plays a notification bell on almost any Linux computer where common desktop components are installed:
play_notification.sh
paplay /usr/share/sounds/freedesktop/stereo/complete.oga
complete.oga
comes from the sound-theme-freedesktop
APT package on Ubuntu, whereas paplay
is part of the pulseaudio-utils
package. If you don’t have these packages installed, you can install them with:
install_notification_sound_deps.sh
sudo apt install sound-theme-freedesktop pulseaudio-utils
Check out similar posts by category:
Linux
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow