NETWORKING - Portable way to get list of all active network interfaces
Translations
Englishالعربية
български
català
中文
čeština
dansk
Nederlands
eesti
suomi
français
Deutsch
Ελληνικά
עברית
हिंदी
magyar
Bahasa Indonesia
italiano
日本語
한국어
latviešu
lietuvių
norsk
polski
Português
română
русский
slovenčina
slovenski
español
svenska
ไทย
Türkçe
українська
Tiếng Việt
I would like to get the list of all active network interfaces (e.g. eth0, wlan0). I assume I'll have to parse the output of ifconfig, but the formatting is different across the various OS's. Does anybody have a portable way to get this information so it can be used on the majority of unices (linux, *bsd, mac).
This question and answers originated from www.serverfault.com
Question by Malcolm Reynolds (5/1/2011 9:53:42 PM)
Answer |
Not sure about portabilty because a list of network interfaces may be related to the kernel implementation and linux is not related at all to *bsd/mac... however if ifconfig is not good for you you can try netstat -i
Answer by hmontoliu
Find More Answers
Related Topics networking ifconfig