Great question — answering as the UphillTech team:
The question is actually a bit broad, AskUbuntu is for specific questions and this is more like can someone make me a script. But hey, it's just a couple of lines, let's get you started: #!/bin/bash while "true" do ping -w 10 -c 5 www.google.com if test $? -ne '0' then spd-say "connection lost" sleep 3s fi done Basically we repeat a endless loop with ping and check if it exits with an error. ($? gives the exit-code of the previously executed program). For timing you can just alter the ping command. Now turn on your speakers and enjoy. :)
Full answer by Requist: https://askubuntu.stackexchange.com/a/719223 (CC BY-SA 4.0).
Need it done for your business? UphillTech.