By default ifconfig
will show me all available interfaces , but what if I just want to display active
ones? Like, en0
only in below.
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 14:10:9f:e0:eb:c9
inet6 fe80::1610:9fff:fee0:ebc9%en0 prefixlen 64 scopeid 0x4
inet X.X.X.X netmask 0xffffff00 broadcast 101.6.69.255
nd6 options=1<PERFORMNUD>
media: autoselect
**status: active**
en3: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=60<TSO4,TSO6>
ether 32:00:14:e7:4f:80
media: autoselect <full-duplex>
**status: inactive**
Notice ifconfig en0
will not satisfy, en0
is not always the active one ;)
I'm running Mac OS X.