Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

It drives me crazy every time I'm on a Linux system and ifconfig is in /sbin, and not on users' PATH, even though the no-argument form works perfectly fine as a user.


use 'ip' instead, ifconfig is deprecated. 'ip addr show' is the simple replacement for 'ifconfig', but ip is pretty flexible in what it can do.


Why? What exactly does ip bring to the table that ifconfig doesn't have? Why am I required to learn YET another tool to do something that ifconfig has no problems doing.

On linux to configure a wireless device you have iwconfig and ifconfig. And you have to use each in a different order to get it work. Whereas in FreeBSD I have ifconfig and it does all of it.


Most newer advanced networking is unavailable in ifconfig. ifconfig and route are now just there for backwards compatibility. The ip tool lets you do all of what ifconfig and route can do, and more.


I would typically agree with you; but the thing that I have really enjoyed in the transition to iproute2 is that ip handles all of: link state, address configuration, arp, tunnels, routing, transformation and a few other obscure things. It brings these together into one tool and unifies the argument syntax for all of them, I find it much easier to play with the network stack using 'ip'.


Ifconfig will fail completely in some cases.

Eg, an alias on a vlan on a bond.


I don't know if I'd prefer a non-portable way to do the same thing :)

Does 'ip' have a form that just prints the current addresses without all the surrounding cruft? That would be pretty useful for the occasional shell script.


'ip addr show dev eth0' will show you the cruft just for eth0, but I'm not sure if there's a way to limit it to just listing the ipv4 or v6 addresses.


just add -4 or -6:

  ip -4 addr show dev eth0 or ip -6 a s eth0




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: