sudo apt update

Install Python3-pip:

sudo apt-get install python3-pip

Install Speedtest-cli Software:

sudo pip3 install speedtest-cli

To Check Speed:

speedtest-cli
Or
speedtest-cli --simple