Live data from Hacker News

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

utcc.utoronto.ca

131–140 of 270 posts

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

#131

"... an ongoing effort to obsolete the old, cross-Unix standard network administration and diagnosis commands of ifconfig, netstat and the like and replace them with fresh new Linux specific things like ss and the ip suite." Old does not mean bad but Linux chooses that path as it moves further away from UNIX and being a Unix-like system in its pursuit to be Windows.

“GNU's Not Unix”. Don't say they didn't warn you.

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

#132

When I started learning Linux when it was, I think, 0.99, I appreciated that so many commands where cross-Unix. It was a Unix lookalike. I could watch how something is done on one Unix, type this stuff into my Linux terminal, and get an equivalent result in Linux, and this helped a lot and created a sense of community. Now I see that Linux tears the standards apart, there are more and more obstacles with porting comp…

Yup, you could say that again. I cut my teeth in Linux while in high school for the most path. First year of college, I go to the engineering labs to get a job, it's all SunOS/Solaris. It's like driving a car! There were very few commands that were different! Now, Linux is slowly going rouge and changing everything in the supposedly name of "progress" I'm still salty as hell with the systemd rubbish. The problem is t…

You do realize Solaris implemented a service management system (which is also superior to systemd; and was also created prior to systemd's conception), right ? They switched away from legacy SysV init scripts BEFORE systemd existed.

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

#133
post #110

Earlier quoted context omitted.

Isn't ifconfig on BSD just an app that happens to share the name and some syntax with the Linux ifconfig? You could map most ifconfig operations to netlink and away from /proc, but that would have other tradeoffs.

I would say the difference is that Linux ifconfig was written once, and never modified. Get a new interface config, write a new tool (see mii-tool, iwconfig, etc) On FreeBSD (and presumably other BSDs), all of the interface configuration happens with ifconfig still, if something new comes up, it's added to the tool that already exists. There are some legitimate concerns around interfaces though -- some of the apis ar…

"and presumably other BSDs"

That is indeed correct in the case of OpenBSD. Halfway rolling my eyes at the article's assertion that it's better to write a new tool than actually bother to maintain the existing one when it's very possible for ifconfig to be a one-stop shop for, you know, interface configuration.

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

#134
post #77

Earlier quoted context omitted.

This is a good reminder that defaults should be simple and human readable. Advanced options should be behind flags for power users, not the other way around.

Indeed. I don't get it why `ip` has -brief which is not a default behavior and why -verbose flag does not exist. Also there could be a -no-color instead of -color flag.

Or simply detect when piped and leave the color out, as just about every sane cli tool does it.

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

#135
post #110

Earlier quoted context omitted.

I would say the difference is that Linux ifconfig was written once, and never modified. Get a new interface config, write a new tool (see mii-tool, iwconfig, etc) On FreeBSD (and presumably other BSDs), all of the interface configuration happens with ifconfig still, if something new comes up, it's added to the tool that already exists. There are some legitimate concerns around interfaces though -- some of the apis ar…

"and presumably other BSDs" That is indeed correct in the case of OpenBSD. Halfway rolling my eyes at the article's assertion that it's better to write a new tool than actually bother to maintain the existing one when it's very possible for ifconfig to be a one-stop shop for, you know, interface configuration.

rolling new rather than maintaining is epidemics within the Linux world. One that most users are insulated from thanks to the hard work of distros for the most part.

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

#136
post #66

When I started learning Linux when it was, I think, 0.99, I appreciated that so many commands where cross-Unix. It was a Unix lookalike. I could watch how something is done on one Unix, type this stuff into my Linux terminal, and get an equivalent result in Linux, and this helped a lot and created a sense of community. Now I see that Linux tears the standards apart, there are more and more obstacles with porting comp…

Not to say I would be a great fan of Linux, but I think at this point it's quite clear it's the huge winner of OSes. Nearly all servers run on it nowadays, I think all relevant smartphones (not sure though, correct me if that's wrong), many desktop/laptop computers and even Windows is integrating more and more with Linux. With such a dominance there is not much point in syncing changes of the standard with other OSes…

Mostly thanks Torvalds accepting just about anything into the kernel, not wanting to play politics if someone rolls a kernel with some drivers that are not GPLed, and keeps a strict API/ABI stability.

Above the kernel it is a wild west, with each "platform" implementing their own stack for anything beyond the core-utils (and those are more likely to be busybox based than GNU based for political reasons).

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

#137
post #87

Earlier quoted context omitted.

Consistency is great, but there’s a trade off between consistency and innovation. In a sense, what you’re describing is stagnation.

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.

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

#138
post #131

"... an ongoing effort to obsolete the old, cross-Unix standard network administration and diagnosis commands of ifconfig, netstat and the like and replace them with fresh new Linux specific things like ss and the ip suite." Old does not mean bad but Linux chooses that path as it moves further away from UNIX and being a Unix-like system in its pursuit to be Windows.

“GNU's Not Unix”. Don't say they didn't warn you.

[deleted]

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

#139
post #58

TIL: iproute2 has a color, a brief/human mode, and a one-line mode. I think I am going to be aliasing ip -color to ip from now on. $ ip -br -c a # ip -brief -color address lo UNKNOWN 127.0.0.1/8 ::1/128 eth0 DOWN wlan0 UP 192.0.2.1/24 2001:db8::1/64 fe80::1/64 $ ip -br -c l # ip -brief -color link lo UNKNOWN 00:00:00:00:00:00 eth0 DOWN 00:12:34:56:78:9a wlan0 UP 12:34:56:78:9a:bc

I'm one of those "grumpy old admins" they mention in the post, but I've switched to using ip for 5+ years now and have been happy. But, -brief -color is a new one on me, and I'm gonna add that to my toolbox.

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

#140
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…

I've always thought the same thing. ip addr's output sucks compared to ifconfig. Looking at it more closely now, ip addr's output doesn't seem that difficult to fix. Remove that random number before the adapter name (what the hell is that anyway? The order in which the adapter appeared? If so, why are not in that order?) I think that alone would make it so much more readable! Maybe white space between each entry with…

It’s the interface index which is mostly an incrmsenfing number. That can become important for sub interfaces and others things that may reference it. Though they could reference by name instead.
Post reply on HN