Linux test internet speed console

Содержание
  1. HowTo: TEST Internet Speed via Linux Command Line
  2. Test Download/Upload Internet Speed in Linux
  3. Test Internet Speed From the Linux Command Line
  4. Share the Result Of Speed Test via Speedtest.net
  5. Get the List Of Available Speedtest.net Servers
  6. Measure the Network Speed to Specific Server
  7. Проверка скорости интернета Linux
  8. Проверка скорости интернета через терминал
  9. Установка SpeedTest-cli
  10. Проверка скорости интернет
  11. Выводы
  12. Run an Internet Speed Test from the Linux Command Line
  13. Different Speed Test Packages
  14. Unofficial Speedtest-CLI Python Script
  15. Official Ookla Speedtest CLI
  16. The Speedtest-cli Python Script
  17. Installing the Speedtest-cli Python Script
  18. Install on Fedora using DNF
  19. Ubuntu or Debian using APT
  20. CentOS/Red Hat 7 / 8
  21. How to Use the Python Script to Run a Speed Test
  22. Speedtest-cli Python Script Options
  23. List Available Speed Test Servers
  24. Specify Specific Server to Test Against
  25. Only Test Upload or Download Speeds
  26. Format Output in JSON or CSV
  27. The Official Ookla Speedtest CLI
  28. Installing the Official Speedtest CLI
  29. Install Speedtest CLI on Ubuntu / Debian:
  30. Install Speedtest CLI on Fedora / Redhat / CentOS:
  31. How to Use the Official Speedtest CLI
  32. Official Speedtest CLI Options
  33. List Available Speed Test Servers
  34. Select Specific Server to Run Speed Test Against
  35. Change Unit Used for Speed Output
  36. Output Formatting Options
  37. Conclusion
  38. Speedtest® CLI
  39. Internet connection measurement for developers
  40. Install Options
  41. Download Speedtest CLI
  42. macOS
  43. Windows
  44. Linux
  45. FreeBSD

HowTo: TEST Internet Speed via Linux Command Line

If you need to troubleshoot an issue with slow Internet access on your Linux system, it would be a good idea to measure the current Internet speed.

In this article you’ll find how to test Internet speed from the Linux terminal, using speedtest_cli – a simple command-line client written in Python for measuring Internet bandwidth by using Speedtest.net infrastructure.

I’ll show how to simply check download/upload Internet speed to the geographically closest server, how to measure the network speed to specific server and how to share the results of speed test via Speedtest.net.

All these tasks can be performed using the Linux command line only.

Test Download/Upload Internet Speed in Linux

Use the following command to Test Internet Download and Upload Speed from the Linux Command Line:

Test Internet Speed From the Linux Command Line

If you are planing to measure Internet bandwidth often, you can install speedtest script on your system:

After installation, you will be able to test Internet speed from the terminal by simply running speedtest command, as follows:

Share the Result Of Speed Test via Speedtest.net

If you want to share the result of speed test, run speedtest command, as follows:

Get the List Of Available Speedtest.net Servers

Run the following command to get the list of all available Speedtest.net servers around the world:

Measure the Network Speed to Specific Server

You can manually specify server ID during testing, instead of using the geographically closest one.

Let’s test the link to “1746) Vodafone DE (Frankfurt, Germany) [1937.90 km]”:

Источник

Проверка скорости интернета Linux

Скорость подключения к интернету — это очень важный параметр работы сети. При подключении к интернету в офисе или дома может понадобиться проверить скорость интернета linux. Обычно, для этого достаточно открыть какой-либо сайт и скачать файл. Но это не единственный способ.

Проверка скорости интернета Linux может быть выполнена с помощью специального сервиса — speedtest.net. Вы можете открыть сайт проекта в браузере, программа определит ближайший к вам сервер, а затем покажет скорость доступа к этому серверу. Для работы сервиса используется флеш-плеер. Но не это тема нашей статьи. Сегодня мы рассмотрим как узнать скорость сети linux через терминал.

Проверка скорости интернета через терминал

Конечно, вы могли бы скачать файл с помощью wget и таким образом узнать скорость интернета. Но тогда на скорость загрузки будет влиять не только пропускная способность вашей сети, но и скорость отдачи сервера. Поэтому лучше использовать сервис speedtest, это, возможно, даже из командной строки.

Читайте также:  Pro100 windows 10 не запускается

speedtest-cli — это скрипт, написанный на Python, который позволяет измерить скорость интернета linux в двух направлениях. Вы можете проверять скорость сети на определенном расстоянии или для конкретных серверов, а также делиться своим результатом в интернете.

Установка SpeedTest-cli

Утилита может быть установлена двумя способами. Или из репозитория пакетов Python, либо прямо с Github, мы рассмотрим оба способа. Начнем с более сложного.

Сначала обновите систему до самой последней версии:

sudo apt update

Установите скрипт установки пакетов python:

sudo apt install python-pip

Затем установите саму программу speedtest-cli с помощью pip:

sudo pip install speedtest-cli

Второй способ еще проще, сначала скачайте файл программы с GitHub и дайте ему права на выполнение:

wget -O speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
$ chmod +x speedtest-cli

Вы можете скопировать скрипт в папку /bin или выполнять его прямо из этой папки.

Проверка скорости интернет

Чтобы проверить скорость интернет linux достаточно запустить скрипт без параметров:

Вы можете посмотреть результат проверки в байтах, а не в битах:

Если хотите поделиться результатом с друзьями, можно попросить программу создать изображение:

Для получения информации только о ping, скорости загрузки и отдачи:

Посмотреть список доступных серверов можно с помощью параметра —list:

Теперь вы можете определить скорость соединения с нужным сервером, для этого достаточно указать ид сервера:

speedtest-cli —server 5907

Чтобы вывести версию утилиты выполните:

А для просмотра всех возможных опций программы:

Выводы

Утилита speedtest-cli очень проста в использовании и в то же время может оказаться очень полезной. Во всяком случае теперь вы знаете как выполняется проверка скорости интернета linux. Если у вас остались вопросы, спрашивайте в комментариях!

Источник

Run an Internet Speed Test from the Linux Command Line

We have all used tools like speedtest.net to test upload and download speeds. Whether it was to test the WiFi in that coffee shop (I use my own tether, never unknown hot spots), preparing for a LAN party (do people still do that?), or just a step in troubleshooting, we have all been there. For one reason or another you simply think you are being cheated of bandwidth, so you want independent verification of your speeds. This typically means opening a browser and going to a website to test your connection. But what if you want to run a speed test on a remote server? In this article we will discuss running an internet speed test from the Linux command line, and skipping the browser.

There is something about the raw efficiency of the command line that I am really attracted to. As I discussed in the article “5 Command Line Tool to Break Your Dependence on the GUI“, I try my best to stay away from the browser. It usually creates an unnecessary distraction. The internet is designed to grab your attention like a laser pointer does to a cat. So let’s get started, and figure out one more way to stay away from the GUI.

Different Speed Test Packages

There are a few different tools you can use to run a speed test from the command line. To make things even more confusing the two most popular share the same exact name, but both use the speedtest.net service.

Unofficial Speedtest-CLI Python Script

The first one is an independently written Python script that is simple to install and use. It is available in the default repositories for some popular Linux distributions.

Pros:

  • Easy to install
  • Wide Availability
  • Full list of servers
  • Can specify upload test, download test, or both

Cons:

  • Minimal output format options
  • No verbose output option

Official Ookla Speedtest CLI

The second tool is built by Ookla, the people who bring you the speedtest.net website and service. Installing it requires you to add a repo for your package manager. But the maintainers offer simple instructions for installation.

Читайте также:  Manjaro linux установка медиа кодеков

Pros:

  • Official release from Ookla
  • More robust formatting options
  • Output easier to read, better layout
  • Verbose output available
  • Has repo making it easy to get updates

Cons:

  • Use limited to nearby servers
  • Cannot specify download or upload only

The Speedtest-cli Python Script

This is an easy way to get started running a speed test on the Linux command line.

Installing the Speedtest-cli Python Script

Simply use your package manager to install the package.

Install on Fedora using DNF

Ubuntu or Debian using APT

CentOS/Red Hat 7 / 8

Unfortunately, CentOS does not offer the rpm in their repos. It can still be easily installed.

Change to /usr/bin directory to make command available to all users:

Fetch script from github:

Make script executable:

Or just copy and paste the whole thing below as a single line:

How to Use the Python Script to Run a Speed Test

The most basic usage is to simply run the command. It will automatically select the best server based on ping responses.

Speedtest-cli Python Script Options

There are several options available to change the default behavior. Here we will outline the most popular options.

List Available Speed Test Servers

You can use the –list option to find a list of available servers to run your test against. At the time of writing this list is pretty extensive with 8829 possible servers.

NOTE: The servers are sorted by distance, closest first.

Specify Specific Server to Test Against

Once you have found the server you want to test against, you can use the –server to select it. The server ID is the first column in the output of the list option above.

Only Test Upload or Download Speeds

The option is actually designed to exclude a test. But since there are only two options it is effectively the same as selecting only one. To run only the download test, you exclude the upload, and vice versa.

Format Output in JSON or CSV

You can specify the output format in JSON or CSV. You also have the opton to use CSV with a custom delimiter. This is handy if you are going to use the output in some other script or application.

Using CSV with a custom delimiter. The default delimiter is a comma, which is implied by the name CSV. Here we use the –csv-delimiter option to change the delimiter to a pipe character.

The Official Ookla Speedtest CLI

The official Speedtest CLI (Command Line Interface) from Ookla is a little more robust. It has all of the options of the python script and more. There are also several output formats not available with the unofficial python script.

Ookla’s speedtest is also a little easier on the eyes. It spreads the information out which makes it easier to read and displays a neat little progress bar. A URL you can use to share the results is also displayed by default.

Installing the Official Speedtest CLI

Install Speedtest CLI on Ubuntu / Debian:

The Speedtest CLI from Ookla is supported on Ubuntu (xenial & bionic) and Debian (jessie, stretch, buster).

Install Speedtest CLI on Fedora / Redhat / CentOS:

Fedora has moved on to DNF for package management, but is still compatible with YUM. These instructions were tested on Fedora 31, CentOS 7 and Red Hat 8.

How to Use the Official Speedtest CLI

Once installed you can simply call the utility by typing “speedtest” at the command line. This will give you all the default information that you would see on the web version of speedtest.net.

Official Speedtest CLI Options

The options available in the official release are more robust. Here we will outline the popular options and how to use them.

List Available Speed Test Servers

Using the -L (–servers) option will give you a list of servers available to run a test against. This option will only show you servers that are “nearby”. What exactly determines nearby is undefined. But for me it looks like they are staying in the tri-state area (PA, NJ, DE).

Читайте также:  Windows 64 bit editions

Optionally, you can use the -o (–host) option and specify the FQDN of the server instead of the ID. But oddly, I don’t see a way to get the FQDN of the servers on the list. I am guessing this option is available for using a custom server.

I haven’t found a way to list all servers. If you are looking to test against a server on the other side of the country, you will have to find it another way.

Select Specific Server to Run Speed Test Against

You can use the -s (–server-id) option to select a server to use from the list. You must supply the server ID with this option. The server ID is the number in the first column of the list output above.

Change Unit Used for Speed Output

The -u (–unit) option can display the speed output in many different formats.

Decimal prefix, bits per second: bps, kbps, Mbps, Gbps
Decimal prefix, bytes per second: B/s, kB/s, MB/s, GB/s
Binary prefix, bits per second: kibps, Mibps, Gibps
Binary prefix, bytes per second: kiB/s, MiB/s, GiB/s

Output Formatting Options

The Ookla Speedtest CLI offers decent options for output formats.

  • Human Readable – Default
  • CSV – Comma Separated Value
  • TSV – Tab Separated Value
  • JSON – JavaScript Object Notation
  • JSONL – JSON Lines
  • JSON-PRETTY – JSON Pretty Printed

Here is an example using json-pretty.

Conclusion

Running a speed test from the command line may not be something that is needed on a daily basis for most people. However, it may prove useful in some troubleshooting situations.

In this article we cover how to run a speed test from the command line using two similar tools. The unofficial python script and the official Ookla Speedtest CLI. We discussed installing, using and setting options for each one. This should be enough to get you started.

For more information on these tools, visit their respective home pages found in the resources section below.

Источник

Speedtest® CLI

Internet connection measurement for developers

Speedtest CLI brings the trusted technology and global server network behind Speedtest to the command line. Built for software developers, system administrators and computer enthusiasts alike, Speedtest CLI is the first official Linux-native Speedtest application backed by Ookla®.

With Speedtest CLI, you can easily:

  • Measure internet connection performance metrics like download, upload, latency and packet loss natively without relying on a web browser
  • Test the internet connection of your Linux desktop, a remote server or even lower-powered devices such as the Raspberry Pi® with the Speedtest Server Network™
  • Set up automated scripts to collect connection performance data, including trends over time
  • Use Speedtest in your programs by wrapping it in the programming language of your choice
  • View test results via CSV, JSONL or JSON

Install Options

Download Speedtest CLI

Speedtest CLI is maintained by the Ookla team. For assistance, please direct all inquiries to support@ookla.com.

macOS

Installing via brew will ensure you are always running the most up-to-date version of Speedtest CLI. You should update brew as frequently as possible.

Windows

Available for x86_64 only.

Linux

Available for: i386, x86_64, arm32, arm32hf, and arm64.

FreeBSD

Available for x86_64 only.

Our mission at Ookla is to make the internet better and faster for everyone by providing data and insights on real-world internet performance and quality. With billions of tests and coverage scans worldwide, we meet you where you are with apps for the devices you use most.

Источник

Оцените статью