When you're running a website or an application on a Linux VPS, network speed plays a crucial role in performance. Whether you’re troubleshooting lag, testing a new server, or simply monitoring your network, knowing how to measure download and upload speeds from the command line is incredibly useful.
Here are a few practical methods to check your Linux VPS’s internet speed — all using terminal tools.
1. Test Speeds with speedtest-cli
One of the easiest and most common tools is speedtest-cli. It's a Python-based command-line tool that connects to Speedtest.net servers.
Install it using pip:
Run a speed test:
This gives you a breakdown of ping, download, and upload speeds in Mbps.
2. Use wget to Simulate a File Download
If you want a quick and simple test of just your download speed, try using wget to pull a large test file.
Example:
It’ll show you the average download speed during the file transfer. While it’s not a full speed test (since it doesn’t measure upload), it’s still a good way to get a rough idea.
3. Monitor Real-Time Traffic with nload
If you’d rather keep an eye on live network usage — say while running updates or syncing data — nload is a great option.
Install it:
Run it:
It displays both incoming and outgoing traffic in real-time using an easy-to-read graph in your terminal.
4. Track Bandwidth Over Time with vnStat
Want to see how much traffic your VPS is using daily, weekly, or monthly? vnStat is a lightweight tool that tracks bandwidth over time.
Install:
Initialize it (replace eth0 with your interface):
sudo vnstat -u -i eth0
View reports:
vnstat -m # Monthly report
vnstat -l # Live traffic monitor
It’s perfect for usage auditing or checking whether your server is being under- or over-utilized.
Conclusion
Each of these tools serves a slightly different purpose:
- Speedtest-cli is great for instant testing.
- wget provides a simple one-way speed snapshot.
- nload and vnStat help with monitoring ongoing traffic.
Depending on whether you're just curious or troubleshooting a critical issue, one or more of these tools should give you exactly the insight you need.