Your cart is currently empty!
How to Speed Test Your Internet From the Linux Command Line
If you’re using Linux and want to check your internet speed without opening a browser or dealing with bloated GUI tools, you’re in luck. You can get accurate results straight from the terminal in under a minute.
Here’s how.
1. Use speedtest-cli
The most popular command-line tool for testing internet speed is speedtest-cli
. It uses Speedtest.net’s infrastructure and is reliable across most Linux distributions.
Install speedtest-cli
On Debian/Ubuntu:
sudo apt update
sudo apt install speedtest-cli
On Fedora:
sudo dnf install speedtest-cli
On Arch:
sudo pacman -S speedtest-cli
Run a Speed Test
Once installed, just run:
speedtest
You’ll get output showing your ping, download speed, and upload speed.
2. Try fast
for Simplicity
Netflix’s fast.com
service has a CLI tool too, called fast
. It’s dead simple if all you care about is download speed.
Install fast
Using npm
:
npm install --global fast-cli
Run It
fast
Quick and clean, though you won’t get ping or upload speed.
3. Use nperf
or LibreSpeed
for More Control (Optional)
If you’re looking for alternatives that let you choose a server or customize tests, consider:
- LibreSpeed CLI – A self-hostable, privacy-friendly option.
- nPerf CLI – Not officially supported but possible via scripting.
These are a bit more involved but useful in enterprise or network testing environments.
Bonus: Script It
Want to log your internet speed over time? Here’s a quick bash script:
#!/bin/bash
timestamp=$(date '+%Y-%m-%d %H:%M:%S')
speed=$(speedtest-cli --simple)
echo "$timestamp - $speed" >> ~/speedtest-log.txt
Make it executable:
chmod +x speed_logger.sh
Run it manually or schedule it with cron
.
Conclusion
You don’t need a browser to check your internet speed. Tools like speedtest-cli
and fast-cli
give you quick insights directly from the Linux command line. Whether you’re diagnosing a slow connection or keeping tabs on your ISP, the terminal has your back.