Methods to Check Network Cards(NIC) in Linux

First Command:
Choose a command based on the network card you have. If you’re feeling lazy, you can use the following commands:

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

Second Command:
If you want to see more detailed information about your network card, this command is suitable:

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

If the output is too long and you want a simpler view, add -short.

Third Command:
If you’re curious about the speeds supported by your network card, this command is more appropriate:

bash# ethtool -i eth0
# ethtool enp0s31f6

Assuming ethtool is installed, you can add the device ID (e.g., enp0s31f6) at the end. You can check the device ID using # ifconfig. From the output, look for “Supported link modes” to see the supported speeds.

Additional Notes:
There are many other commands available, but these three should cover most issues related to checking network cards in Linux.