[Toybox] complaining about 'ifconfig' - better use 'ip'

Rob Landley rob at landley.net
Wed Apr 3 16:39:12 PDT 2013


On 04/03/2013 10:28:00 AM, Bastian Bittorf wrote:
> * Isaac Dunham <idunham at lavabit.com> [03.04.2013 17:16]:
> > I learned Linux in 2006, and use ifconfig all the time.
> > It's much more informative, much more obvious to use
> 
> ofcourse this is always, from which side you are looking.
> 
> if you are used to 'ifconfig' and never used 'ip' than you
> have to read something about it. same vica versa.

I've used "ip" a couple times. I mostly use ifconfig, because it's  
there and I see no upside in using "ip". I also use iwlist and  
ifenslave and tunctl and various other tools. Does ip have some kind of  
plugin architecture to suck all that into one big monolithic command?

> if you are
> really using 'ifconfig', you should better switch now. the
> pain will be much worse if you wait again 2 years...

In what way? I vaguely recall first hearing about "ip" back under Red  
Hat 9, which shipped in 2003. So I've been successfully largely  
ignoring it for 10 years now. What's queued up to change in the near  
future?

Is there a standard on this? I'm happy to implement a standard...

> bye, bastian
> 
> PS:
> ip address add 192.168.1.2/24 dev eth0
> ip address show
> ip route list exact 0/0 table mytable
> ip route get 10.63.12.4
> ip neigh show

Can use the ip command to manipulate the arp cache too? [checks] Of  
course you can. So for me to implement "ip" is as much code as for me  
to implement _how_ many other commands? Does it have code for moving  
interfaces into and out of containers too?

$ man ip | wc -l
1853
$ man ifconfig | wc -l
185

Oh yes, obviously a much simpler command than ifconfig. Obvious choice,  
really. (How do I trigger the built in dhcp client, I'm not finding it  
in the man page. Did ubuntu not compile that in? I vaguely remember  
using it once...)

$ man bash | wc -l
5459

I suppose I can take solace that the bash man page is almost 3 times as  
long as the ip man page...

Rob


More information about the Toybox mailing list