Set a Bandwidth limit

Often is a situation where is more than one user under same router. One way is to set bandwidth limit.

At first install packages wondershaper xterm and zenity

sudo apt install wondershaper xterm zenity

Then see your connection

inxi -Nn

And then make a scrip using your connection information (like wlo1)

My script

#!/bin/sh

zenity --question --text "Set a Bandwidth limit?"
if [ $? = 0 ];
then
xterm -e sudo wondershaper wlo1 3000 1000 && zenity --info --text "Bandwidth is limited"
else exit 0
fi

zenity --question --text "Remove a Bandwidth limit??"
if [ $? = 0 ];
then
xterm -e sudo wondershaper clear wlo1 && zenity --info --text "Limit is removed"
fi
exit 1

Make the script executable

chmod +x Bandwidth-limit.sh