There is a bug in some older versions of the linux speedtest client that causes it to always  report upload speed of about 4mbit/sec, no matter what the server is capable of.  Ubuntu 18.04 is known to have this fault for example.


If you just want to confirm the correct speed without updating the installed speedtest software, you can run this command:


curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python3


If you prefer to upgrade your installed speedtest client permanently there are two options:


Install official Ookla speedtest client

The company that runs speedtest.net has an official closed-source client that can be used instead of the open-source version included with linux distributions.


To install the official speedtest client, you can either do so through your package manager as documented on to https://www.speedtest.net/apps/cli  (click the button for your distribution and follow the provided instructions) or simply download their .deb file and install:


apt remove -y speedtest-cli
wget https://ookla.bintray.com/debian/ookla-speedtest-1.0.0-x86_64-linux.deb
dpkg -i ookla-speedtest-1.0.0-x86_64-linux.deb


The official client does have a few advantages, for example it displays transfer speed in real-time and is able to upload your results to their website for sharing. Here's an example run:


# speedtest -s 6355

   Speedtest by Ookla

     Server: AARNet - Sydney (id = 6355)
        ISP: Mammoth Media Pty
    Latency:     1.06 ms   (0.03 ms jitter)
   Download:  1847.18 Mbps (data used: 3.1 GB)
     Upload:  1734.21 Mbps (data used: 1.0 GB)
Packet Loss:     0.0%
 Result URL: https://www.speedtest.net/result/c/10112baa-fe4c-44bc-bfba-885b4fb8b1e3


The Result URL can then be shared directly, e.g. https://www.speedtest.net/result/c/10112baa-fe4c-44bc-bfba-885b4fb8b1e3


Install updated unofficial client

If you prefer to use open-source software you can update your installed open-source client to the latest version. First remove the existing install and then download the latest copy from github.


apt remove -y speedtest-cli
curl -L https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py \
  -o /usr/local/bin/speedtest
chmod +x /usr/local/bin/speedtest