Live data from Hacker News

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

utcc.utoronto.ca

121–130 of 270 posts

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

#121

Earlier quoted context omitted.

A bird in the hand is worth two in the bush. The article speaks of old software but, instead of fixing what it has and being standards compliant, it chooses to break away and do its own thing along with the new bugs and other issues which will surely arise.

> "instead of fixing what it has and being standards compliant, it chooses to break away and do its own thing along with the new bugs and other issues which will surely arise." Well, people are still free to maintain and improve those older tools and bring them up to par with newer standards, if they want to. Others would argue it's time to start phasing out code and so-called "standards" we've had since the early 90…

They don't need to change the frontend to change the backend. There's a certain cognitive load to having to re-learn basic commands, and a certain annoyance when those changes are of little benefit to my day-to-day sysadmin duties.

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

#122
post #77
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

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.

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

#123

While this article makes a case for the new command, the reality is simple. I personally learned ifconfig continually in my life and so I learned how to read it and interpret what it was trying to say. It output its commands in a fairly easy to parse way. The new command, while I am sure is progressive and forward thinking, feels clunky. I often have to try to remember the name of the command itself as it is not obvi…

I feel like systemctl and journalctl are the same way. They are terrible commands with awful usability. Having a full process control system is nice and helpful when writing a package once for several platforms, but I wish something had caught on that had better usability and didn't try to do everything from login management to filesystem mounting, but rather just process management.

Where as someone could probably write a newer drop in ifconfig that uses modern kernel APIs, several people have tried to for systemd and it's just so massive no fork can keep up anymore and almost all have been abandoned.

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

#124
As I opened this article, I thought "I bet this is going to be related to some Goddamned systemd change".

And sure enough, about halfway through:

>This interface has an IP alias, set up through systemd's networkd.

The amount of pain and headache this init-kitchen-sink-wannabe-thing has caused me day-to-day is incalculable.

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

#125
post #62
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…

> "ip" is useless as a keyword if you're looking for help online. I don't know the decisions behind the naming either, but the ip shell command comes as part of the iproute2 [1] package. After I found out about this googling became much easier. [1] https://en.wikipedia.org/wiki/Iproute2

Well, sure, but assume you're new and you don't know that. You can usually search for "man ip" to get close, but that usually just gets you a technical reference for an experienced user (the man page) and not a tutorial, introduction, or training doc for someone learning a new tool. "ip command tutorial" works well, though the results are still rather mixed. I get Cisco and Windows results as well until I search "ip command tutorial linux".

The point is that searching for "ifconfig tutorial" is going to give you what you want, while "ip route" is probably going to get you Cisco documentation, honestly. Even something like "parse ip output" is going to give you a mix of results from Linux, Windows, or web services while "parse ifconfig output" is a lot more clear.

"ip" is simply a saturated keyword, making it a bad keyword.

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

#126

Earlier quoted context omitted.

I have used ip -oneline to parse configuration of servers, and it's really practical. The only real gripe I have with IP is their long argument/switch format. Unlike everyone else, ip is a minority, which accepts long options with single dash "-". This prevents someone from combining many short parameters under a single dash, also it's confusing to use. Yes, it unofficially supports the old double dash format, but if…

This is ridiculous. I would love to know their justification for using single dash for long options. When did that become the "old way"?? Very old X11 commands and many Solaris commands use a single dash, but nearly all modern commands use double dash. And I agree that this syntax makes it hard to combine single-character options. They must have had a very compelling reason to use a non-standard option syntax.

The only other place I've seen single-dash long options be the norm is within TCL scripts (where that's conventional whenever a proc takes named arguments/options).

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

#127

I'm all for the new tools (and actually prefer ip over ifconfig). However, they really screwed up with ss: the output is really unusable/unreadable. This really only becomes obvious when you pass the -p flag, where the program information is printed on its own line. It gets slightly better if you pipe the output through cat: now the program information is printed on the same line, but the column spacing is incorrect…

>This really only becomes obvious when you pass the -p flag, where the program information is printed on its own line.

It isn't on its own line, it's just wrapped so grep works properly.

>but the column spacing is incorrect instead.

ss output is column-based so it is useless to bother with tools like cat for parsing.

ss -p | less -S is the simplest solution for you

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

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

Poking at ip and its sub-commands reminds me of poking at the serial interface of a Cisco router, and not in any pleasant way...

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

#130
post #80
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…

The summary is: ifconfig output format does not support new networking features like IP aliases[0]. Changing the output format would break many scripts, so ifconfig will not be changed. [0] It does support "interface aliases" and that seems to be something different

Removing ifconfig (the implied end-goal of deprecating it) would also break many scripts.
Post reply on HN