Celebrate Our 22nd Anniversary with Huge Savings! Up to 70% Off

How to Measure Download and Upload Speed on a Linux VPS?

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:

 
pip install speedtest-cli or sudo apt install speedtest-cli

 

Run a speed test:

 
speedtest-cli

 

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:

 
wget --output-document=/dev/null http://speedtest.tele2.net/10MB.zip

 

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:

 
sudo apt install nload

 

Run it:

 
nload

 

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:

 
sudo apt install vnstat

 

Initialize it (replace eth0 with your interface):

 
 

sudo vnstat -u -i eth0

 

View reports:

 
vnstat -d      # Daily report
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.


Was this answer helpful?

« Back