Categories: Ubuntu

How to Check Link Speed in Ubuntu

The link speed in a basic network refers to the maximum speed that a device can communicate with the wireless router. The link speed is expressed in bits/second and may vary depending on the device and the wireless access point.

In most cases, you will find speeds like 144.4Mbps, 300Mbps, 100Mbps for fast ethernets, or 1000Mbps for devices such as Gigabit ethernets.

I will not dive into how the various layers of the TCP/IP process the speeds. Instead, we’ll focus on how to check for link speed on Ubuntu.

Method 1: Using the IP Command

The very first method to get the link speed of your interface is using the IP command.

Sponsored

We are all familiar with the IP command in Linux; it is part of the net-tools package. It allows us to configure network interfaces in the Linux system, including bringing interfaces up and down, setting IP addresses, netmasks, routes, and more. Thus, it is a powerful tool for network administrators.

To get the link speed of your interface, use the ip command followed by grep as:

sudo ip -a | grep qlen

In the above command, we grep for qlen, which shows the transmit queue length of the network interface in packets.

Here is an example:

The above shows the interfaces, loopback, and eth0, which is an ethernet adapter.

Method 2: Ask the Kernel

As you guessed, in this method, we will view the interface speed directly from the kernel. The network interface information is stored in the /sys/classes/net/[interface_name]/speed.

All we need to do is query the file using a cat as:

sudo cat /sys/classes/net/eth0/speed

The output is as shown:

Method 3: Network Manager

The simplest and most common is to look at the network interface in the network manager GUI tool.

Sponsored

In Ubuntu, to get the Link speed of the ethernet interface. Click on the Network connection action in the top bar and select “Wired Settings.”

This should take you to the network management window that shows the link speed as shown below:

Method 4: Mii-Tool/Ethtool

The next method is somewhat unconventional but works for systems with the tool installed. In this case, you can use the mii-tool or ethtool. They both allow users to query the device for information.

However, that may require you to have root or a user with sudo privileges to work.

NOTE: If you are on a Linux machine that does not have the tools installed, use the method discussed above as it will work in most systems.

To get the link speed of a network interface using the ethtool, use the command:

sudo ethtool <interface_name>

The command below shows the link speed for the interface eth0 as shown:

sudo ethtool eth0

To learn more how to use the ethtool, consider the manual in the 8th section or use the link below:

man 8 ethtool

<a href=“https://linux.die.net/man/8/ethtool”>https://linux.die.net/man/8/ethtoola>

Conclusion

In this tutorial, we discussed various methods and tricks to get the link speed of network interfaces in Ubuntu.

Thank you for reading.

Ubuntu Server Admin

Recent Posts

AI in 2025: is it an agentic year?

2024 was the GenAI year. With new and more performant LLMs and a higher number…

5 minutes ago

Canonical announces 12 year Kubernetes LTS

Canonical’s Kubernetes LTS (Long Term Support) will support FedRAMP compliance and receive at least 12…

1 day ago

Ubuntu Weekly Newsletter Issue 878

Welcome to the Ubuntu Weekly Newsletter, Issue 878 for the week of February 2 –…

2 days ago

How your feedback shapes the way we support open source software

At Canonical, we firmly believe that delivering an outstanding, customer-centric support experience is impossible without…

2 days ago

How To Install osTicket v1.14 On Ubuntu 20.04

I want to share how to install osTicket v1.14 for Ubuntu 20.04 server. osTicket written…

3 days ago

How To Install WordPress On Ubuntu 20.04

Now I want to share how to install WordPress on ubuntu 20.04 server. WordPress is…

3 days ago