ifconfig
is a traditional command to display information about network interfaces and change some settings. In particular, it can bring interfaces up and down. It exists on most unix variants.
On Linux, the ifconfig
command hasn't evolved in a long time. It's still perfectly fine for what it does. If you're using ifconfig
for something, there's no reason to stop.
Linux also provides the ip
command from the iproute2 tool suite. The ip
command combines several classical commands and more, including ifconfig
, route
and arp
. ip
can do a lot more than ifconfig
. On the other hand, ip
isn't always present, especially on embedded systems (and never on unix variants other than Linux).
Parsing ifconfig
's output kinda sucks. Parsing ip
's output kinda sucks. No winner there.