I want to see how many interfaces(ethernet cards) are
working using single command?

Answers were Sorted based on User's Feedback



I want to see how many interfaces(ethernet cards) are working using single command?..

Answer / friend

mii-tool

Is This Answer Correct ?    21 Yes 2 No

I want to see how many interfaces(ethernet cards) are working using single command?..

Answer / shrikant

ifconfig
OR
ifconfig -a

Is This Answer Correct ?    15 Yes 0 No

I want to see how many interfaces(ethernet cards) are working using single command?..

Answer / rallapalli

#ifconfig -a

except loopback

Is This Answer Correct ?    4 Yes 0 No

I want to see how many interfaces(ethernet cards) are working using single command?..

Answer / viren

lspci -n | grep 200


class 200 is the address of ethernet adapter

Is This Answer Correct ?    2 Yes 0 No

I want to see how many interfaces(ethernet cards) are working using single command?..

Answer / alf55

The command:

ifconfig -a | (grep -E 'Link encap:|inet6 addr|inet addr:' |
grep -vE 'inet addr:|inet6 addr')

Would result with an output similar to:

eth0 Link encap:Ethernet HWaddr 00:90:f5:b7:6a:1c
lo Link encap:Local Loopback
sit0 Link encap:IPv6-in-IPv4
wlan0 Link encap:Ethernet HWaddr 00:24:d7:a7:16:c0

So the command:

ifconfig -a | (grep -E 'Link encap:|inet6 addr|inet addr:' |
grep -vE 'inet addr:|inet6 addr') | wc -l

would produce the count.

The problem here is that it would also count usages such as
"eth0:0".

To not count those devices use:

ifconfig -a | (grep -E 'Link encap:|inet6 addr|inet addr:' |
grep -vE 'inet addr:|inet6 addr:|:[0-9][0-9]*') |wc -l

Is This Answer Correct ?    1 Yes 0 No

I want to see how many interfaces(ethernet cards) are working using single command?..

Answer / sanil

mii-tool
ifconfig -a

Is This Answer Correct ?    1 Yes 1 No

I want to see how many interfaces(ethernet cards) are working using single command?..

Answer / venkat

lot of single commands:

ifconfig
mii-tool
arp
iftracf

Is This Answer Correct ?    0 Yes 1 No

I want to see how many interfaces(ethernet cards) are working using single command?..

Answer / vel

#ethtool

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Linux Commands Interview Questions

How do I clear my run history?

0 Answers  


Explain grep command.

0 Answers  


I want to see how many interfaces(ethernet cards) are working using single command?

8 Answers  


what are the linux boot files?

9 Answers   CSS, Wipro,


1. Why "d" is postfix in almost every service name of Linux like httpd, dhcpd? 2. how to restrict su & ssh services for some users? 3. how can we configure a default gateway for 10 n/w cards in a server?

6 Answers  






You wish to print the file vacations with 60 lines to a page. Which of the following commands will accomplish this?

0 Answers  


what is linux utilities and editor

4 Answers   Oracle, Wipro,


What is the command to see all the processes are working in the last 30 days?

9 Answers  


What is clang space engineers?

0 Answers  


What does chmod 644 do?

0 Answers  


what is the difference between service and process?

7 Answers   IBM,


what is lilo?How it is useful in linux?

3 Answers   HCL, SofTec,


Categories