Live data from Hacker News

There are real reasons for Linux to replace ifconfig, netstat, etc

utcc.utoronto.ca

211–220 of 270 posts

Re: There are real reasons for Linux to replace ifconfig, netstat, etc

#211
post #72

The real reason there is drift in Linux tooling is because there are two communities making tools for Linux (GNU and Linux Foundation associated projects) and the two groups seem to find new reasons to hate each other every year. It’s a dumb reason for tooling to drift, but an understandable reason. I have a feeling that ifconfig and netstat will keep up fine, but that the party line will be that they are deprecated.

Yeah, SysV init is still around, udev has been renamed eudev and is still being developed, etc. Don't tell anyone in Linux officialdom, though. It upsets them.

Re: There are real reasons for Linux to replace ifconfig, netstat, etc

#212
post #176

Earlier quoted context omitted.

Huh, does "ip" also support "tc" (traffic control) commands - qdisc is a queueing discipline... tc seems to be the an earlier thing from the people who brought us ip. tc must have the worst command line interface and documentation ever - it is very hard and very frustrating to use, like no other command line interface I've ever seen. I once tried to use tc and gave up after more than a day of trying, that is how bad…

MegaCLI (lsi hw raid control) sees your tc and raised you a few million awful flags.

Ah, my old friend MegaCLI. Simultaneously the most verbose and the most useless --help output I've ever seen from a command-line program.

Re: There are real reasons for Linux to replace ifconfig, netstat, etc

#213
post #183

Earlier quoted context omitted.

> It's been unmaintained for over 17 years. So is the Linux ecosystem just going to rewrite tools everytime their original developer moves on or passes away? It's going to happen more in the future, so are we going to see more and more rewrites in Linux? There's something to be said about the BSD approach of maintaining the OS (kernel + userland) as a whole. They don't seem to have this problem.

One great thinker gave a very clear view of what is going on in so many open source projects: https://www.jwz.org/doc/cadt.html

I prefer fixing bugs to rewriting. Anyone want to hire me? /semi-sarcastic

Re: There are real reasons for Linux to replace ifconfig, netstat, etc

#214
post #106

Bookmark https://dougvitale.wordpress.com/2011/12/21/deprecated-linux...

This sort of thing is the reason I never use Linux for anything more serious than a laptop. It's impossible to know when a new table like this will become necessary to do really basic stuff that I already learned how to do years ago.

Re: There are real reasons for Linux to replace ifconfig, netstat, etc

#216
post #69

So, to summarize, ifconfig has to be replaced because it relies on the /proc filesystem and it doesn't handle aliases? This is easily disproven: ifconfig on FreeBSD doesn't rely on /proc and handles aliases just fine. It sounds a bit like the whole OSS/ALSA discussion – some argued that ALSA was needed to replace OSS because OSS didn't support muxing multiple simultaneous audio streams, but strangely OSS on FreeBSD d…

BSD's ifconfig isn't really related to Linux's ifconfig anymore because BSD has continued development and the Linux fork or version (don't remember which it is anymore) hasn't. Linux's ifconfig is a part of net-tools ( http://net-tools.sourceforge.net/ ) and the latest release of net-tools, v1.6, was released in April 2001. It's been unmaintained for over 17 years. Some distros began deprecating ifconfig when the Lin…

So Debian can remove mysql and alias it to mariadb (with all kinds of interesting side-effects), but nobody thought to fork net-tools in order to actually maintain it, but instead decided to write something from scratch?

Re: There are real reasons for Linux to replace ifconfig, netstat, etc

#217
post #61
post #32

Earlier quoted context omitted.

to get the gateway: ip route show default > > ifconfig's output is simply more readable IMO I prefer iproute2's terseness.

That just shows its user-unfriendliness further. Here's a more readable version of the output: > ip route | column -t (With iproute2 4.3.0, I get the same output between "route", "route show", and "route show default"; no idea if it's changed since.)

Wow. That's actually kind of a tiny little brilliant gem that remains to be discovered by many. I, for one, had never though about trying this.

Alas it doesn't work quite so well for "ip addr". It would have been great if they'd just decided on CSV or JSON or whatever and then relied on secondary utilities to go to "pretty-printed".

Re: There are real reasons for Linux to replace ifconfig, netstat, etc

#218
post #18

I'm trying hard to fight my old muscle memory to use ip instead of ifconfig on Linux. I have a few issues though: * "ip" is useless as a keyword if you're looking for help online. It's extremely frustrating and probably my main issue actually learning how to use the damn thing. * ifconfig's output is simply more readable IMO: https://svkt.org/~simias/up/20180525-113825_ip-vs-ifconfig.p... . It's pretty weird that a b…

If you like India Pale Ale, then the handy "ip a" command might come second nature to you. Sounds weird, but this mnemonic was what I needed to get on board.

Re: There are real reasons for Linux to replace ifconfig, netstat, etc

#219
post #87

Earlier quoted context omitted.

OpenBSD's ifconfig did not stagnate. It handles aliases, bridges, wifi, etc. No, the issue is that no one at GNU or Linux cares about correct, simple tools (2 APIs for networking in the kernel?! What happened to manpages?! WTF info?). And thanks to that it runs on anything. Pick your poison https://man.openbsd.org/ifconfig.8

I'm not sure what the point you are making here is. The developers behind "ifconfig" on Linux could support the new API (iproute2) just as the developers behind "ifconfig" on OpenBSD updated their software to support the new kernel API as they became available.

The point is that in the BSDs, ifconfig is developed and released together with the kernel.

See, for example, https://svnweb.freebsd.org/base?view=revision&revision=31237..., where the author added support for hardware packet pacing. The commit touches ifconfig, socket header files, and various parts of the kernel all in one atomic change.

Re: There are real reasons for Linux to replace ifconfig, netstat, etc

#220
post #64

Earlier quoted context omitted.

Future tip: your package manager should be able to find this for you, for example: > $ which ip > /sbin/ip > $ dpkg -S /sbin/ip > iproute2: /sbin/ip

You may also want 'whereis' instead of 'which'. I use cope to colorize my output, which makes 'which' useless to me for most common commands, but 'whereis' still works. Edit for examples: $ which ip /usr/share/perl5/vendor_perl/auto/share/dist/Cope/ip $ whereis ip ip: /usr/bin/ip /usr/share/perl5/vendor_perl/auto/share/dist/Cope/ip /usr/share/man/man7/ip.7.gz /usr/share/man/man8/ip.8.gz

> whereis

Thanks for this! After 14+ years of using Linux almost daily, I had never heard of this command. I learned something new today, so now it's time to go home!

Post reply on HN