Networking

How do I check my NIC card speed Linux?

NIC or network interface card provides an interface between your system and a network apart from one wired network or wireless. Every NIC comes with a speed rating like 100 Mbps or 1Gbps. Knowing the NIC card speed can be helpful in different situations. It can help you diagnose performance issues. Knowing the speed limit of the NIC is also helpful if you are upgrading your internet services to higher bandwidth, as it will help you to verify if you can take full advantage of the available bandwidth.

In this post, we will describe how to check NIC card speed in Linux OS.

Method#1 Using ethtool

Ethtool is a handy tool that lets you view and manage drivers and hardware configuration settings. By default, this tool is not installed on the Linux system. To install ethtool in your Linux distributions, use the following commands:

For Ubuntu/Debian/Mint

You can install it using this command in the Terminal:

$ sudo apt install ethtool

For CentOS/Redhat/Fedora

$ sudo dnf install ethtool

Enter sudo password, after which the installation will be started. Once the installation is completed, you are ready to use the tool.

To find your NIC speed, you will first need to know your NIC name. You can use this command to find the NIC name:

$ ip a

Now to find NIC speed, issue the below command in Terminal:

$ sudo ethtool <interfae_name>

In our case, the NIC name is ens33, so that the command would be:

$ sudo ethtool ens33

The output of the above command gives information about the network configuration also including the NIC speed.

If you are not interested in detailed information about the network configuration and just want to display the speed of NIC, use the command below:

$ sudo ethtool ens33 | grep -i speed

If prompted for the password, enter the sudo password.

This command only displays the speed of the NIC, which in our case is 1000Mb/s.

Method#2 Using dmesg

The dmesg command is used to display the kernel-related messages on the Linux system. We can also use this command to find the NIC card speed.

For instance, to find your network card speed, use the dmesg command as follows:

$ dmesg | grep <interface_name> | grep up

Replace <interface_name> with your network interface card name.

Here is the output of the above command in our system, which shows the NIC speed is 1000Mbps.

Method#3 Using mii-tool

Mii-tool is used to examine or change a NIC’s Media Independent Interface (MII) unit’s status. To install mii-tools in your Linux distributions, use the following commands:

For Ubuntu/Debian/Mint

$ sudo apt install net-tools

For CentOS/Redhat/Fedora

$ sudo dnf install net-tools

To find your NIC speed, use the mii-tool as follows:

$ sudo mii-tool -v <interface_name>

Replace <interface_name> with your network interface card name. Below is the mii-tool command output in our system, which shows the NIC speed is 1000Mbps.

This post shows how to check the NIC card speed in Linux OS using different tools, including ethtool, dmesg, and mii-tool. Once you find the NIC speed, it will be easier for you to decide whether to change the card in case of a network upgrade.

About the author

Karim Buzdar

Karim Buzdar

Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. He blogs at LinuxWays.