Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I'm looking for a tool that will test my internet connection bandwidth and create an simple report like speedtest does.

Do you know some program/tool that do this? Something with CentOS packages would be nice.

share|improve this question

7 Answers 7

up vote 4 down vote accepted

ttcp is a simple, possibly too simple, speed test utility.

pchar is another one people cite a lot, I've had bad luck with it, personally.

Here's how I'd use ttcp. You need two machines, each with ttcp ( compiled on them.

HostA % ./ttcp -r -s -p 9401 

HostB % ./ttcp -s -p 9401 < /boot/vmlinuz

Once you've figured out how to get it to run, try different length files to see how speed varies. Use UDP (-u flag on both reader and sender command line) for even more fun!

share|improve this answer
can you give me an example how to use ttcp? – Wolfy Jun 27 '11 at 16:25
If I don't have 2 machines? – Wolfy Jun 27 '11 at 17:04
If you don't have two machines, ttcp is worthless. It just sends a specified number of bytes over TCP or UDP as fast as it cam, and reports how long it took. Too simple, like I wrote above. – Bruce Ediger Jun 27 '11 at 17:20

I'm just repeating the answers listed on this (deleted?) stackoverflow question:


wget --output-document=/dev/null


git clone
cd speedtest-cli 

Then you have the exact style results from with cli.


You could use iperf to test the speed between two machines, since 'iperf' was designed to measure bandwidth.

on machine1 (host, this one will receive)

iperf -s -p 65000

on machine2 (client, this one will upload)

iperf -c [ip of server] -p 65000

Reverse the machines to test the other way (upload->download or vice versa).


It looks like there is a tool available on sourceforge that uses from the terminal.

Terminal speedtest:

share|improve this answer

You might be interested in TeSpeed. It is described as:

If you are looking for tool that is able to test internet connection speed fron Linux terminal, you have found it! :) TeSpeed uses servers to check upload and download rate and it puts that information on charts.

share|improve this answer
I try it, but it doesn't work... – Wolfy Jun 27 '11 at 19:53
@wolfy, can you give me some more details? error messages perhaps... – jonyamo Jun 27 '11 at 21:12
when I run it, it only print that it starts testing and quit... no error, no info... maybe something in code is missing... I corrected the full path to speedtest.php, but this doesn't helped... – Wolfy Jun 28 '11 at 12:42
sounds like it might be dying when it attempts to run curl_init. run "php -m | grep curl" to make sure you have the curl module installed and if not that would be your problem. – jonyamo Jun 28 '11 at 14:47
It has been updated and moved to Github. – Janhouse Sep 24 '12 at 4:03

Very basic, but I use a simple shellscript to download a 10MB file from my provider or nearby FTP-server:


wget ; rm 10mb.bin
## is down...
#wget ; rm 10mb.bin
#curl -LO ; rm 10mb.bin

The output will look like this:

--2011-06-27 23:36:21--
           => `10mb.bin'
Resolving (
Connecting to (||:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/test ... done.
==> SIZE 10mb.bin ... 10485760
==> PASV ... done.    ==> RETR 10mb.bin ... done.
Length: 10485760 (10M) (unauthoritative)

100%[===================================================>] 10,485,760  1.09M/s   in 9.8s    

2011-06-27 23:36:31 (1.02 MB/s) - `10mb.bin' saved [10485760]

Use wget or curl as shown in the script according to your wishes and try to find a server more close to your region (Slovenia). Most are in NL, but maybe .IT will fit your needs:

share|improve this answer
Thanks for this. Do you know how can I measure my upload? – Wolfy Jun 28 '11 at 7:28
Try using cURL. Look into the cURL manpage under uploading: and improve / enhance the above script yourself ;-) – Henk Jun 28 '11 at 7:49

You can also try

They use curl (which is a well known command line utility) to run a speed test.

The code is published on GitHub as well. In short,

wget && chmod u+x && bash

share|improve this answer

speed testing an internet connection or between two endpoints depends on several factors. Like the window size,jitter,unordered delivery etc. Refer: Internet Speed test through Command line.

share|improve this answer
This would be considered as link only answer. Add more elaborative info from the link to your answer. – mtk Feb 5 '13 at 7:49

I recommend the speedtest-cli tool for this. I created a blog post (Measure Internet Connection Speed from the Linux Command Line) that goes into detail of downloading, installing and usage of it.

Install Git (APT)

$ sudo apt-get install git-core

Install Git (YUM)

$ sudo yum install git

Clone the Repository from GitHub

$ git clone

Sample Usage and Output

$ ./speedtest-cli
Retrieving configuration...
Retrieving server list...
Testing from Comcast Cable (x.x.x.x)...
Selecting best server based on ping...
Hosted by FiberCloud, Inc (Seattle, WA) [12.03 km]: 44.028 ms
Testing download speed........................................
Download: 32.29 Mbit/s
Testing upload speed..................................................
Upload: 5.18 Mbit/s
share|improve this answer
Offtopic, but if somebody has no git installed, wget seems easier then installing git just to clone. – manatwork Mar 19 '13 at 9:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.