{"id":14872,"date":"2022-11-15T00:21:34","date_gmt":"2022-11-14T21:21:34","guid":{"rendered":"https:\/\/kifarunix.com\/?p=14872"},"modified":"2024-03-09T23:14:23","modified_gmt":"2024-03-09T20:14:23","slug":"easy-way-to-test-internet-speed-on-linux-terminal","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/easy-way-to-test-internet-speed-on-linux-terminal\/","title":{"rendered":"Easy way to Test Internet Speed on Linux Terminal"},"content":{"rendered":"\n
In this tutorial, we will show you an easy way to test Internet speed on Linux terminal. More often than not you might want to know or confirm the capacity at which your ISP network can transmit data here in referred to Internet speed or bandwidth. In most cases, folks uses browser-based tools to test their Internet speed. However, there are command line-centric ninjas that want to use Linux terminal or command line to test their Internet speed. This guide is for them, -:).<\/p>\n\n\n\n
One of the most popular sites that appears at the top of the Google search results for the keyword “speed test” is https:\/\/www.speedtest.net<\/a> by Speedtest by Ookla.<\/p>\n\n\n\n When you hit the Go button, the site will calculate your download and upload speed.<\/p>\n\n\n\n Well, Speedtest by Ookla also provides a speedtest-cli tool that you can install on Linux systems to enable you perform Internet speed test on Linux terminal.<\/p>\n\n\n\n As much as there could other command line based tools that you can use to test your ISP Internet speed test on a Linux command line, this guide will only focus on speedtest<\/a> cli tool by Ookla.<\/p>\n\n\n\n Install Speedtest CLI Tool on Ubuntu\/Debian<\/p>\n\n\n\n Note that default Ubuntu repositories by default ships with another speedtest-cli<\/a> tool which is available on the default Ubuntu universe repositories;<\/p>\n\n\n\n This tool has since become increasingly inaccurate with high-speed connections.<\/p>\n\n\n\n Thus, you need to install speedtest utility by Ookla.<\/p>\n\n\n\n As a result, you need to install Ookla repositories;<\/p>\n\n\n\n Install Ookla speedtest CLI tool on Ubuntu\/Debian<\/p>\n\n\n\n Similarly, CentOS\/Fedora\/Oracle Linux ships with speedtest-cli too which has since become in-accurate with high-speed connections.<\/p>\n\n\n\n To install Speedtest by Ookla on CentOS\/Oracle\/Fedora Linux;<\/p>\n\n\n\n Install Epel repository;<\/p>\n\n\n\n How can you use speedtest command line tool to test Internet connection speed?<\/p>\n\n\n\n You can simply execute it without no options to test Internet speed on Linux terminal.<\/p>\n\n\n\n Accept the end user license agreement and proceed to test Internet connection speed.<\/p>\n\n\n\n You can print the output in different formats;<\/p>\n\n\n\n You can as well follow the given url to view the results.<\/p>\n\n\n\n And that is it on how you can test Internet Speed on Linux Terminal.<\/p>\n\n\n\n Installing Perf Performance Analysis Tool on CentOS 8<\/a><\/p>\n\n\n\n<\/figure><\/a><\/div>\n\n\n\n
Install Speedtest CLI Tool<\/h3>\n\n\n\n
apt info speedtest-cli<\/code><\/pre>\n\n\n\n
apt install wget curl gnupg2 apt-transport-https<\/code><\/pre>\n\n\n\n
wget -qO- https:\/\/packagecloud.io\/ookla\/speedtest-cli\/gpgkey | \\\ngpg --dearmor -o \/etc\/apt\/trusted.gpg.d\/ookla.gpg<\/code><\/pre>\n\n\n\n
echo -e \\\n\"deb https:\/\/packagecloud.io\/ookla\/speedtest-cli\/ubuntu\/ $(lsb_release -sc) main \ndeb-src https:\/\/packagecloud.io\/ookla\/speedtest-cli\/ubuntu\/ $(lsb_release -sc) main\" \\\n> \/etc\/apt\/sources.list.d\/ookla.list<\/code><\/pre>\n\n\n\n
apt update<\/code><\/pre>\n\n\n\n
apt install speedtest<\/code><\/pre>\n\n\n\n
Install Speedtest CLI Tool on CentOS\/Oracle\/Fedora Linux<\/h4>\n\n\n\n
yum install epel-release<\/code><\/pre>\n\n\n\n
\necho -e \\\n\"[ookla_speedtest-cli]\nname=ookla_speedtest-cli\nbaseurl=https:\/\/packagecloud.io\/ookla\/speedtest-cli\/el\/`rpm -E %{rhel}`\/x86_64\nrepo_gpgcheck=1\ngpgcheck=0\nenabled=1\ngpgkey=https:\/\/packagecloud.io\/ookla\/speedtest-cli\/gpgkey\nsslverify=1\nsslcacert=\/etc\/pki\/tls\/certs\/ca-bundle.crt\nmetadata_expire=300\" > \/etc\/yum.repos.d\/ookla_speedtest-cli.repo\n<\/code><\/pre>\n\n\n\n
yum install speedtest<\/code><\/pre>\n\n\n\n
Test Internet Speed on Linux Terminal<\/h3>\n\n\n\n
speedtest --help<\/code><\/pre>\n\n\n\n
\nSpeedtest by Ookla is the official command line client for testing the speed and performance of your internet connection.\n\nVersion: speedtest 1.2.0.84\n\nUsage: speedtest [
speedtest<\/code><\/pre>\n\n\n\n
\n==============================================================================\n\nYou may only use this Speedtest software and information generated\nfrom it for personal, non-commercial use, through a command line\ninterface on a personal computer. Your use of this software is subject\nto the End User License Agreement, Terms of Use and Privacy Policy at\nthese URLs:\n\n\thttps:\/\/www.speedtest.net\/about\/eula\n\thttps:\/\/www.speedtest.net\/about\/terms\n\thttps:\/\/www.speedtest.net\/about\/privacy\n\n==============================================================================\n\nDo you accept the license? [type YES to accept]: YES\nLicense acceptance recorded. Continuing.\n\n\n Speedtest by Ookla\n\n[error] Error: [0] Cannot open socket\n[error] Error: [0] Cannot open socket\n Server: Vijiji Connect Limited - Nairobi (id: 38303)\n ISP: Safaricom\nIdle Latency: 16.89 ms (jitter: 0.37ms, low: 16.29ms, high: 17.29ms)\n Download: 21.16 Mbps (data used: 28.5 MB) \n 27.12 ms (jitter: 17.47ms, low: 16.60ms, high: 907.09ms)\n Upload: 19.43 Mbps (data used: 32.9 MB) \n 22.03 ms (jitter: 12.49ms, low: 17.13ms, high: 380.48ms)<\/strong>\n Packet Loss: 0.0%\n Result URL: https:\/\/www.speedtest.net\/result\/c\/caf9b6f8-d4bb-4c09-b665-ed821c38659d\n<\/code><\/pre>\n\n\n\n
speedtest -f json-pretty<\/code><\/pre>\n\n\n\n
\n{\n \"type\": \"result\",\n \"timestamp\": \"2022-11-14T21:09:01Z\",\n \"ping\": {\n \"jitter\": 0.993,\n \"latency\": 16.579,\n \"low\": 16.002,\n \"high\": 18.150\n },\n \"download\": {\n \"bandwidth\": 2731345,\n \"bytes\": 27656856,\n \"elapsed\": 10008\n },\n \"upload\": {\n \"bandwidth\": 2451465,\n \"bytes\": 27651819,\n \"elapsed\": 10603,\n \"latency\": {\n \"iqm\": 21.777,\n \"low\": 15.447,\n \"high\": 363.695,\n \"jitter\": 14.991\n }\n },\n \"packetLoss\": 0,\n \"isp\": \"Safaricom\",\n \"interface\": {\n \"internalIp\": \"10.0.2.15\",\n \"name\": \"enp0s3\",\n \"macAddr\": \"08:00:27:70:3D:6C\",\n \"isVpn\": false,\n \"externalIp\": \"41.xx.65.2x9\"\n },\n \"server\": {\n \"id\": 21848,\n \"host\": \"speedtest-thk.safaricom.com\",\n \"port\": 8080,\n \"name\": \"Safaricom\",\n \"location\": \"Nairobi\",\n \"country\": \"Kenya\",\n \"ip\": \"197.248.2xx.102\"\n },\n \"result\": {\n \"id\": \"14aa97ac-b2cc-4ca9-ac8b-5e32f445486c\",\n \"url\": \"https:\/\/www.speedtest.net\/result\/c\/14aa97ac-b2cc-4ca9-ac8b-5e32f445486c\",\n \"persisted\": true\n }\n}\n<\/code><\/pre>\n\n\n\n
<\/figure>\n\n\n\n