header image
Home arrow Linux Bits and Bobs arrow Useful Linux Commands
Useful Linux Commands PDF Print

[root@bowenvale ~]# cat /proc/net/dev

[root@bowenvale ~]# tcpdump -i rausb0

[root@bowenvale ~]# 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:63055197  187394    0    0    0     0          0         0 63055197  187394    0    0    0     0       0          0
  eth0:397692820 1387986    0    0    0     0          0         0 199363162 1521182    0    0    0     0       0          0
  eth1:219157126 1608267    0    0    0     0          0         0 348621792 1352065    0    0    0     0       0          0
  eth2:10956896   89736    0    0    0     0          0         0 106594087  110307    0    0    0   272       0          0
  sit0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
rausb0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
[root@bowenvale ~]#

As you can see, this command displays a list of all the computers network interfaces even if they're not up.  

You can use ifconfig but it will only show the ones that are up

[root@bowenvale ~]# tcpdump -i rausb0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on rausb0, link-type EN10MB (Ethernet), capture size 96 bytes

This command watches for data traveling across the specific interface. In this case the interface is rausb0 (a wireless, usb dongle, interface) a more common interface name would be eth0.