How to use ifconfig to show active interface only
32
votes
12
answers
125845
views
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 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
media: autoselect
**status: active**
en3: flags=8963 mtu 1500
options=60
ether 32:00:14:e7:4f:80
media: autoselect
**status: inactive**
Notice ifconfig en0
will not satisfy, en0
is not always the active one ;)
I'm running Mac OS X.
Asked by qweruiop
(500 rep)
Dec 1, 2013, 05:15 AM
Last activity: Sep 20, 2023, 03:37 PM
Last activity: Sep 20, 2023, 03:37 PM