How to identify Linux network cards (NICs)

(1) lspci

You can use the command below.

# lspci | egrep -i --color 'network|ethernet'
# lspci | egrep -i --color 'network|ethernet|wireless|wi-fi'

(2) lshw

If you want to learn more about your network card, this command is for you.

# lshw -class network
# lshw -class network -short

If you think it’s too long and want to keep it simple, you can add -short.

(3) ethtool

If you want to know what speeds your network card supports, this command is more appropriate.

# ethtool -i eth0
# ethtool enp0s31f6

If you have ethtool installed, you can optionally add the device id (e.g., enp0s31f6) to the end to see the connection speed in Supported link modes: # to see what speeds you can connect at.

The device id (e.g. enp0s31f6) can be found in ifconfig.

There are many other commands,
These three commands should be sufficient for most Linux network card verification issues.

Leave a Reply

Your email address will not be published. Required fields are marked *