Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My "Dedicated Server" should have two NICs installed but I can only find one.

My Question: What other commands and methods are available to test how many network cards are installed on my server

lspci | grep Ethernet

Are there any other commands / methods available?

share|improve this question
Do you have physical access to the host? Can you confirm that any expansion cards are properly seated? Are all NIC's from the same manufacturer? – Tok Feb 24 '11 at 16:22
Hello Tok. Thanks for your answer.No the NIC's are not from the same manufacturer (one should be from intel and the other from realtek). =>Your question sounds interesting. What could be the effect/result if the cards are from different manufacturers? And I do not have physical access to the server and do not know if they are correctly installed. thanks. jens. – jens Feb 24 '11 at 18:01
up vote 6 down vote accepted

You can use lshw to see all devices on a machine. To view just the network devices enter:

lshw -class network
share|improve this answer
lshw is not part of a default Debian setup. – Jean-Marc Liotier Sep 13 '11 at 23:56
I find this a bit too much, I'll rather just: ip link show – Matías Nov 3 '14 at 15:24

For Ethernet:

ls -d /sys/class/net/eth* | wc -l
share|improve this answer

/proc/net/dev file has details on all interfaces. e.g.

$ cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
    lo:    3562      60    0    0    0     0          0         0     3562      60    0    0    0     0       0          0
 wlan0: 2491781197 2034240    0    0    0     0          0         0 261797069 1502752    0    0    0     0       0          0
  eth0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0

As you can see, many columns and details are not very easy to read when you cat the file so I would suggest to use ifconfig command which reads that file and formats output nicely.

To list all interfaces use

/sbin/ifconfig -a

that will show you the unconfigured/down network interfaces as well as configured and active ones, as read from /proc/net/dev

share|improve this answer

ip link show will list everything that looks like a network interface.

share|improve this answer
modprobe -c |grep 'eth[0-9]'

shows the real device driver in use for each ethernet device

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.