How to play a sound after a command has finished its execution? [duplicate]
You can combine your command with a command that plays sounds. For example paplay
:
sudo apt-get update && sudo apt-get upgrade; paplay /usr/share/sounds/ubuntu/stereo/message.ogg
Furthermore, if you want to play a sound if the command was successfully completed and another sound in case of an error, you can use something like:
command && paplay $(locate dialog-information.ogg) || paplay $(locate dialog-error.ogg)