Live data from Hacker News

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

utcc.utoronto.ca

61–70 of 270 posts

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

#61
post #32

Earlier quoted context omitted.

> ifconfig's output is simply more readable IMO Yes, this is key, and why ip is so terrible for the way I currently work. No doubt I'll have to get used to it, like those stupid biosdevname interfaces. 90% of my machines don't have more than 1 IP per physical interface, the rest are aliases ifconfig outputs clear whitespace, so picking out the specific details of - interface name - ip address Is far easier. I do pref…

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.)

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

#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

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

#63
post #49

While unrelated to subj or that new systemd wave, I want to state that almost all my sysadm skills are lost. Idk who is responsible for this and if they exists, or is it just time going, but I’m not a power user anymore. Long-term skill investments without a profession are so meaningless – ten years and you stare at the screen with no idea what to do. That was hard time and now it is all for nothing.

I am happy to reinvest the time if the new way is significantly better, it would be worth it. But it never is, someone just got bored and decided to reinvent the wheel. Probably while thinking that they were inventing it for the first time. And we all get dragged along.

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

#64
post #35

Earlier quoted context omitted.

> "ip" is useless as a keyword Most docs will mention iproute2. You can use that for googling.

Yeah that’s what I loved about this article, I finally know what to google.

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

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

#65
post #63
post #49

While unrelated to subj or that new systemd wave, I want to state that almost all my sysadm skills are lost. Idk who is responsible for this and if they exists, or is it just time going, but I’m not a power user anymore. Long-term skill investments without a profession are so meaningless – ten years and you stare at the screen with no idea what to do. That was hard time and now it is all for nothing.

I am happy to reinvest the time if the new way is significantly better, it would be worth it. But it never is, someone just got bored and decided to reinvent the wheel. Probably while thinking that they were inventing it for the first time. And we all get dragged along.

But it was adopted on it's merits and not because of politics! /s

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

#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. The moment it works different in Linux that is the new majority standard.

And while a lot more stuff is changed all the time than would be necessary one also can't expect things to stay the same for another 100 years just because they have been like that for a long time.

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

#67
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

Thanks! Just aliased that in my .zshrc. The route object doesn't seem to do colouring sadly.

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

#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 did support it, with no need to replace the entire audio API.

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

#70

I noticed some shortcomings in ifconfig (only shows the first ip assigned to an interface if a NIC has many) so in some senses i see why it had to be updated, by i see no logical reason why both the command and the syntaxes had to change? Why not stick to the parameter standard at least?

The new interface is close to plain english in most common cases, so I'd say it's a significant win.
Post reply on HN