Is there a command that I can verify by its output the speed of my NIC and some information about its characteristics such as duplex full or half .
3 Answers
Suppose your NIC name eth0 :
You can verify the speed and some informations by three Commands :
First Command :
dmesg |grep eth0
Output :

Second Command :
mii-tool -v eth0
Output :

FD : full duplex , Logic that enables concurrent sending and receiving. This is usually desirable and enabled when your computer is connected to a switch.
HD : half duplex , his logic requires a card to only send or receive at a single point of time. When your machine is connected to a Hub, it auto-negotiates itself and uses half duplex to avoid collisions.
Third command :
ethtool eth0
ethtool - Display or change ethernet card settings
Install ethtool :
sudo apt-get install ethtool
Output :
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
Hope it helps .
- 37,371
- 34
- 117
- 131
-
1ethtool eth0 is installed on 18.04 by default – Ryan Jeremiah Freeman Oct 02 '18 at 19:57
-
@RyanJeremiahFreeman only if you don't chose the minimal install option, my 18.04 did not have that installed by default – Brian Leishman May 28 '19 at 19:06
To obtain the link speed of an interface without parsing logs or installing additional tools, simply read its corresponding speed sysfs node, as follows:
cat /sys/class/net/<interface>/speed
where is the name of your NIC, e.g. eth0
- 321
- 2
- 3
-
On 19.04, I had to get the name of eth0, obtained from dmesg. In my case, eth0 has been renamed enp0s31f6. So the command to get the speed was cat /sys/class/net/enp0s31f6/speed This information was also available through the GUI, through the network icon of the top bar : Wired Connected > Wired Settings – SR_ Apr 25 '19 at 07:51
You can use NetSpeed Extension
NetSpeed is a GNOME shell extension that displays the sum of your download and upload speed in your gnome panel. Clicking on it displays the separate values in a drop-down.
You can download it from Ubuntu Software Store.
It is applicable only if you use the GNOME desktop environment.
- 323
- 4
- 13
-
-
-
1I read the question to ask how to check statistics of the underlying Ethernet connection, let (e.g. 1Gbps), and whether it is full or half duplex, etc, not what its current actual utilization is. Sorry, what I wrote sounds a bit aggressive in retrospect. – Keeley Hoek Aug 24 '20 at 13:36
-
Ohh, you are right @KeeleyHoek. But when I was serching to check my NIC speed, I came to this thread, beacuse of the nature of the title. So, I thought many like me would be directed here by google search for the same. Hence, I posted my answer. I hope that this will help someone. And never mind about aggressiveness. Text is the best way to create misunderstanding. – Deepam Gupta Aug 24 '20 at 21:18
