
There are real reasons for Linux to replace ifconfig, netstat, etc - zdw
https://utcc.utoronto.ca/~cks/space/blog/linux/ReplacingNetstatNotBad
======
simias
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...](https://svkt.org/~simias/up/20180525-113825_ip-vs-ifconfig.png) . It's pretty weird that a brand new tool manages to have worse output than a venerable old unix command. Because of this I often end up configuring the network with ip only to double-check everything is right with a quick ifconfig. That's silly.

I think at this point I would've preferred if they had made an "ifconfig2"
instead, mostly identical to the old one but with a few breaking changes to
add the missing functionality. An incremental update instead of a full
rewrite. There's definitely some NIH going on.

~~~
viraptor
> "ip" is useless as a keyword

Most docs will mention iproute2. You can use that for googling.

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

~~~
Izkata
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

~~~
amyjess
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

~~~
8_hours_ago
> 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!

~~~
ssebastianj
Yeah, I recently "discovered" the commands 'whatis' [0] and 'apropos' [1] and
my experience learning Linux improved quite a bit.

[0] [https://linux.die.net/man/1/whatis](https://linux.die.net/man/1/whatis)

[1] [https://linux.die.net/man/1/apropos](https://linux.die.net/man/1/apropos)

~~~
cjcampbell
Thanks for passing those on as well!

------
iod
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 <LOOPBACK,UP,LOWER_UP> 
      eth0   DOWN     00:12:34:56:78:9a <NO-CARRIER,BROADCAST,MULTICAST,UP> 
      wlan0  UP       12:34:56:78:9a:bc <BROADCAST,MULTICAST,UP,LOWER_UP>

~~~
dak1
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.

~~~
piotrkubisa
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.

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

~~~
eeZah7Ux
Spot on. A good pattern is to autodetect what to do by default and yet allow
forcing on/off (e.g. --color and --no-color)

~~~
kchr
Agreed. It could be as simple as checking if there is a tty and whether or not
we're inside a pipe.

------
blackhaz
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 complex applications. More over, we can also see
the emergence of "we support Ubuntu only, sorry" mentality - Linux became very
diverged. I'm so happy to be using FreeBSD now on all my boxes, with it's
init, ifconfig, file system hierarchy.

~~~
erikb
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.

~~~
econochoice
Kernel won, userland didn't.

~~~
erikb
It's not the first time I hear it, but what is it supposed to mean? Is there a
single thing that can be called "linux userland"? Also, I doubt that someone
combines Linux kernel with Windows XP userland. So in some regard all userland
tooling running on the linux kernel might be considered "linux userland".

If I understand the term userland correctly it is a term from kernel
developers to say "this is code that doesn't run in the kernel", so it might
not be helpful to any popularity discussion at all.

~~~
majewsky
> Also, I doubt that someone combines Linux kernel with Windows XP userland.

That's Wine.

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

~~~
da_chicken
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/](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 Linux 2.2
kernel was released because it lacked features. The Linux ifconfig command
doesn't support wireless network devices because they essentially didn't
exists when the the command was written. Shit's _old_.

It's like comparing Seamonkey to Netscape Communicator.

~~~
ori_b
> 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.

There's a simple solution to the lack of maintenance on ifconfig: Maintain
ifconfig.

There's no need to break shit.

~~~
da_chicken
It's open source. Feel free. I'd expect there are significant architectural
differences between Linux and BSD by this point, though, that would make it
quite a challenge. Alternately, it might be like adding major new features to
Xorg: possible but extremely challenging.

My understanding is that the Linux version of net-tools was based on the BSD
software, but I don't know how much code is actually shared between the two
projects. It was intended to be _syntactically_ equivalent and support the
same features (at the time). You'd probably find it easier to write a net-
tools-like wrapper for iproute2.

Yes, someone _could_ have just extended net-tools. But nobody did. Instead,
they wrote iwconfig and other tools when they were needed, and then someone
decided to write a competing package, iproute2, that did everything. And that
package added feature support when they were added them to the kernel, and
bugs got fixed. Those didn't happen with net-tools unless each distro took
care of it.

[https://lwn.net/Articles/710533/](https://lwn.net/Articles/710533/)

~~~
ori_b
> It's open source. Feel free.

I use BSD. And while I would send in patches for ifconfig, I haven't needed
to. I have sent in patches for other things.

------
aepiepaey
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
instead.

On the other hand it's nice that they kept compatibility, at least for the
most common flags (e.g. -nltp does the same thing in both).

~~~
mandelbulb
>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

~~~
aepiepaey
What? No.

First: Apparently the ss developer(s) decided to finally fix the output in
some recent version (it was changed to behave sanely somewhere between
iproute2-ss161212 and iproute2-ss180402).

However, if you're stuck with an older version, what I said still stands, and
the below applies to those versions:

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

While _technically_ correct, that doesn't really matter in any practical
sense, because the columns are padded so that the final column containing the
program is wrapped onto the next line.

When ss stdout is connected to a pipe it will produce different output: this
output is much less wide, so that the program name fits onto the same line as
the rest of the columns. But, as said previously, it screws up the alignment
of the columns, making it impossible to quickly scan them (using your eyes).

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

What? cat doesn't do any parsing. The only reason for using cat there is to
connect ss' stdout to a pipe and thus trigger its different output.

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

No. '| less -S' gives no improvement over '| cat', since ss output fits onto
one line without wrapping as soon as you pipe it through any other program. An
actual improvement would be to instead use '| column -t', which would (mostly)
fix issues with misaligned columns.

Anyway, if you can, just use a modern enough ss instead (not sure when it was
fixed, but iproute2-ss180402 (iproute2 4.16.0) is definitely new enough),
which has sane output regardless of whether stdout is connected to a pipe or
terminal.

------
SCHiM
I've lost much muscle memory and skill with newer systems.

When I was younger I had time for deep dives into
configs/manuals/googles/mailthreads. These days my job assumes I know all the
stuff and ins and outs, not having a good time re-learning everything I
already know how to do...

It's not new anymore and gives no joy for learning new things, no time to do
it either. It sucks.

~~~
freehunter
Yeah I don’t buy into the idea that because there were some under-the-hood
changes that had to be made, that means the whole application has to be thrown
away and a new interface re-written. I don’t believe for a second that these
developers couldn’t have dropped in a new backend and mapped the same commands
to it.

Putting a shinier coat of paint on the command line isn’t going to attract a
wider audience, it’s just going to piss off the only people who actually use
the command line regularly. The CLI is the last place you want “change for the
sake of change”.

~~~
fhayde
IMO, it's because understanding someone else's code and introducing your own
changes is something that requires a considerable amount of experience and
knowledge which many new developers have not acquired yet. Instead of trying
to take the time to understand how to integrate the changes they're trying to
make with an existing project, they create something new practically centered
around this new feature and a lot of stuff gets lost along the way.

At the end of the day, it's fine though. It'll either satisfy the needs of
people and become a new standard or it will be satisfy edge cases and become
the new thing that needs to be deprecated because no-one contributes to the
project and the original maintainer has lost interest.

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

~~~
VLM
If you were a productive unix sysadmin in 2008 you are a productive unix
sysadmin in 2018. Its just that Linux is no longer unix-like and you've
switched from using, perhaps, Debian install media in '08 to FreeBSD install
media in '18\. Its not really that big of a problem. Its much easier and more
productive to switch to FreeBSD than to switch to ... whatever it is Linux is
becoming.

~~~
jrnichols
> If you were a productive unix sysadmin in 2008 you are a productive unix
> sysadmin in 2018.

Unless you mention Perl to someone now, and that someone might be 10 years
younger but still your manager, and they look at you like you just spoke
greek.

~~~
sverige
Ha ha! Perl has become the shit test for whether I feel like dealing with
certain people. "Oh, you don't use Perl?...." Not everyone, just certain ones.

------
fb03
It's pretty clear that ip is the superior and more modern tool, i believe they
could work on the presentation layer of the software tho... its output pales
compared to ifconfig, as other peers have stated.

that's what really gives us grumpy old sysadmins the kneejerk reactions. every
time i log into a system and i have to tipo "ip a" i need to stop and try to
slowly decode the unformatted soup letter that is presented instead of a
nicelly formatted table like on ifconfig.

~~~
sverige
I hear this argument a lot: this or that is the "more modern tool." The
problem is I almost never see the benefits in the same way I can tell how,
say, a battery-powered nail gun is superior to hammering hand-held nails.
Usually it's just a hammer with a cross peen instead of a claw, painted a
different color.

------
tannhaeuser
Isn't the described mismatch between "reality" and what ifconfig reports once
again a case of systemd (networkd) not exposing IP aliases in the traditional
way, and replacing established network concepts by it's own stuff? Meant as a
genuine question rather than trolling (though I know I'd hate to bow to
whatever systemd comes up with rather than just using ifconfig which has
worked since the begin of times) eg. there might be a material problem here in
how network interfaces are presented by ifconfig.

~~~
JdeBP
No. The Linux kernel has two APIs, and has had since before systemd even
existed. ifconfig uses the ioctl() API, which presents the concept of alias IP
addresses in one way. ip uses the netlink API, which presents the concept of
multiple IP addresses per interface in a different way. M. Siebenmann did
include this point.

* [https://sourceforge.net/p/net-tools/bugs/12/](https://sourceforge.net/p/net-tools/bugs/12/)

* [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=359676](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=359676)

~~~
poizan42
This begs the question of why the kernel doesn't allocate an alias for
backwards compatibility when adding IP adresses through the netlink API.

~~~
brazzledazzle
I think they are fundamentally different things. Correct me if I’m wrong, but
I think a netlink alias is just an additional address and an old-school alias
is more like a virtual interface.

------
jbschirtzinger
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 obvious. It is a good example of a command not
really doing the function of making the job easier on the network admin in
favor of accommodating new conceptions of features. All the thousands of hours
I spent on ifconfig are, basically, useless unless I want to be antiquated and
have useless debates about standards. Basically, I just want the computer to
do what I tell it with as little extra trouble as possible.

~~~
djsumdog
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.

~~~
kashyapc
Are they really "terrible" with "awful usability"? In my day-to-day debugging,
I do find `journalctl` _much_ better. Let's see a couple of quick examples:

\- Show logs for the current boot: _$ journalctl -b_

\- To get all errors that are of priority level ERROR and worse: _$ journalctl
-b -p err_

\- Show me logs for a given binary: _$ journalctl /usr/sbin/libvirtd_

\- Or via its unit file: _$ journalctl -u libvirtd -l_

\- Want to query all the errors for a given disk? Here we go: _$ journalctl
/dev/sda -p err_

And so on...

~~~
yarrel
Yes that is an awful soup of switches that should either be separate commands
or usages of existing Unix tools.

~~~
craftyguy
Ok, then you've traded one command with switches for multiple commands each
with their own set of switches (and almost certainly following different
switch 'standards'). I like systemctl/journalctl for cleaning up that mess,
even if it requires me to learn how to use them.

------
klaasvakie
I've never understood the purpose of IP aliases like the "secondary em0" the
author is setting up with systemd.networkd. These aliases are practically
useless, you cannot bind() to them without knowing the IP, you cannot use them
in firewall rules, you cannot setup dhcp for them etc. What are people using
them for?

I'm not sure what the low level difference is between an alias like in the
article, or a "eth0:1" type alias (made with ifconfig eth0:1 xx.xx.xx.xx up),
but the "eth0:1" type alias seems infinitely more useful.

This is also a major deficiency of the Ubuntu 18.04 netplan implementation, it
can only do the systemd.networkd type aliases and not the "eth0:1" type ones.
What gives?

~~~
linuxguy2
> What are people using them for?

In my case, keepalived VRRP floating addresses.

~~~
vidarh
I've used eth0:xx style aliases for that for a decade with no problem. Do you
know what the difference is?

~~~
dozzie
Yeah, your eth0:xx is just a label (a tag of sorts) attached to the entry.
Otherwise, they're exactly the same thing.

You can even add an address with `ip addr add' that will be visible to
ifconfig.

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

~~~
sverige
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.

------
mercora
this makes it sound like the only thing ip does is replace ifconfig which is
not the case. It is more like like a go to application to manage the network
stack to some degree. You can set up various tunnel interfaces, vlans, routes,
routing rules, IPsec policies, network namespaces and more. Learning how to
deal with it gets you quite far. Learning how to read the help output is often
enough to understand everything and definitely worth the effort, even if all
you want to do is to show the assigned IP addresses...

I also appreciate very much the mostly consistent syntax for various sub
commands. Its often an easy guess to know how to do what...

~~~
joosters
_Learning how to read the help output is often enough_

I find the 'ip --help' is virtually incomprehensible, and the man page no
better. There's no explanation about _what_ the tool can do, only some
machine-readable formatting of the syntax expected. This kind of documentation
is useless IMO, it's actively hostile to new users.

~~~
rmu09
The tool allows one to manipulate kernel objects more or less 1:1, so
documentation and help of 'ip' and 'tc' is adequate enough if you know what
those kernel objects are and how they behave, but it won't help if you don't
know anything about linux networking or traffic shaping in the first place.

~~~
grepthisab
What's the best way to learn these things?

~~~
pas
LWN (
[https://lwn.net/Kernel/Index/#Networking](https://lwn.net/Kernel/Index/#Networking)
), LWN + kernel documentation (
[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking)
) , more LWN + iproute2 source/news/commitlog (
[https://git.kernel.org/pub/scm/network/iproute2/iproute2.git...](https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/log/)
and
[https://git.kernel.org/pub/scm/network/iproute2/iproute2.git...](https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/log/ip)
<< basically the names will give you what to search for on LWN ), and a bit
more reading ( [https://www.netdevconf.org/](https://www.netdevconf.org/) )

... and trying them (the features) out. In VMs and in other network
simulators. ( [http://mininet.org/overview/](http://mininet.org/overview/)
comes to mind, but simply using Vagrant / Virtualbox is okay )

Also, networking is very standardized (duh :)), so if you follow network
related stuff (
[https://www.reddit.com/r/networking/](https://www.reddit.com/r/networking/)
), you can sort of get a feel for what might come to the Linux kernel.

LWN is still the best in this regard, because it deals with new developments,
so reading the archives will tell you what might be in the kernel.

Furthermore, since nowadays everything is kube-cloud-virtual-container-open-
netes-stack, looking at network developments for these technologies will get
you in the know. (Seemingly bonkers stuff, like BGP for containers is now bog
standard with things like Calico. Running a full switch in kernel with an
awesome distributed overlay network for "cloud" without OpenFlow? OVN by OVS
got your back. Doing all this fast? DPDK is uber fast, but XDP is just so
conveniently clever.)

Plus there's the datacenter networking stuff, like TRILL/SPB (
[https://networkingnerd.net/2016/05/11/the-death-of-
trill/](https://networkingnerd.net/2016/05/11/the-death-of-trill/) ), but
those haven't got integrated into the kernel, because the aforementioned
Calico, OVN and other overlay stuff.

Oh, and the best way is to keep asking questions!

~~~
felixgallo
I'm sure you mean well, but this comment epitomizes the problem. Formerly,
Unix was fairly modular, open to comprehension, and had excellent
documentation guiding the user. Now, everyone who isn't a paying Red Hat
support customer is not just on their own but thrown to the wolves.

~~~
pas
But why would anyone be on their own in the age of stackoverflow and a
thousand other user support avenues.

And there are good books and endless awesome posts/blogs about Linux. The new
low level stuff is not covered as well obviously. (And I think it's a shame
devs don't communicate well, but they are not perfect, nor they are paid for
writing good docs, only for code.)

Furthermore, was the modularity of Unix ever really exercised? Are there
success stories replacing dd, cp, ls, or parts of lower level stuff?

------
rmu09
What's all the fuzz about this "sudden" change? iproute2 is part of linux
(kernel) since 1999 or so.

~~~
exikyut
It promptly got filed under "ah, learn that one day", then after coming up
enough times got relegated to "ugh, stop bothering me about it, I'll get to it
eventually" and everyone has been un-motivated-ly unimpressed about it ever
since.

I think.

~~~
toxik
FWIW I can usually never get ifconfig to do what I want it to, but with ip
it's usually fairly straight-forward.

------
unrequited
This is slightly off topic. Netflix has transformed the output of netstat to
have more immediate visibility. Its good to have something like this.

[https://imgur.com/a/g8P2Nm2](https://imgur.com/a/g8P2Nm2)

~~~
brazzledazzle
That’s pretty neat actually. Thanks for sharing.

------
intsunny
Why did they have to make the output of `ss` so cumbersome? I often end up
installing the legacy tooling just so I can have `netstat`

~~~
mseebach
It seems like a missed opportunity not to have a JSON (or other explicitly
machine readable format) output option for easy scripting use through jq.
Every time I need to craft a grep regex to get some trivial piece of
information from one of these tools, I feel there's a bug waiting to happen
(and I'm usually right).

~~~
lclarkmichalek
ip has a --json flag:
[https://github.com/CumulusNetworks/iproute2/commit/5df607725...](https://github.com/CumulusNetworks/iproute2/commit/5df607725928d532a3b7e5095c04e943b2c3ce7f)

~~~
helb
Hmm, not for everything, apparently. It works with "-json addr" or "-json
link", but not with eg. "-json route" or most other things i've tried.

------
AnnoyingSwede
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?

~~~
Xylakant
if you're changing underlying functionality, you'll have to change at least
some of those parameters ("show me the first IP address" of an interface might
be a contrived example). So now you have the option to slightly change the
parameters and keep some, but not all of the behavior, maybe even in a
slightly different way or you can have a clean break and clean up the old
parameter list with all its accumulated cruft and go for a designed and
thought-out interface.

------
JdeBP
M. Siebenmann's actual main point, ignored by much of the "I do/do not like
ip/ifconfig." discussion here, is that it is valid to replace ifconfig because
the standard output of the command is an interface contract that is set in
stone because of people using it in scripts.

I disagree, on two grounds.

Firstly, the ifconfig commands in the BSDs are existence proofs that this is
not so. The BSD people actually _have_ modified ifconfig to keep up with
changing kernel networking abilities, and one will find the (say) FreeBSD
ifconfig of today having a lot more functionality than the Linux one. The
BSDs, by their very natures, kept their ifconfig tools aligned with the rest
of the operating system as it changed.

* [https://freebsd.org/cgi/man.cgi?query=ifconfig](https://freebsd.org/cgi/man.cgi?query=ifconfig)

* [https://linux.die.net/man/8/ifconfig](https://linux.die.net/man/8/ifconfig)

* [https://unix.stackexchange.com/questions/319350/](https://unix.stackexchange.com/questions/319350/)

Secondly, an aversion to breaking (badly designed) scripts is isn't really the
reason that ifconfig hasn't been changed. The reason that ifconfig hasn't been
changed, as evident from the net-tools bug and other discussions of this, one
of which I have hyperlinked elsewhere in this discussion, is more to do with
(purportedly) _doing things portably_ and _not having two disjoint code paths_
, one for Linux using netlink and one for everything else using ioctl. Two
code paths and code that was not portable to other operating systems would be
the result of adding netlink capability to net-tools's ifconfig.

That reason does not itself hold water, however. The net-tools package is
highly Linux-specific _anyway_ , in the first place, so arguments about its
portability are moot. Given that, the _actually expressed reason_ for not
doing this given by the developers themselves (as opposed to the differing
reasons inferred by people other than the developers, the most often given one
of which is directly contradicted by git repository activity as recent as
2016) founders.

* [https://github.com/ecki/net-tools/commits/master](https://github.com/ecki/net-tools/commits/master)

One of the more disappointing things about Linux's ifconfig is that this:

    
    
        # ifconfig lo inet6 ::1
        Don't know how to set addresses for family 10.
        #
    

is a fairly trivial oversight in a case statement in the code, a missing case
for AF_INET6, rather than a fundamental design or implementation problem, and
doesn't even need the netlink API to fix.

* [https://sourceforge.net/p/net-tools/code/ci/master/tree/ifco...](https://sourceforge.net/p/net-tools/code/ci/master/tree/ifconfig.c#l978)

* [https://sourceforge.net/p/net-tools/code/ci/master/tree/ifco...](https://sourceforge.net/p/net-tools/code/ci/master/tree/ifconfig.c#l807)

~~~
carapace
(It took me a sec to realize you were using the verb "founder".)

Excellent point.

------
IshKebab
Maybe in new tools they should randomly change the formatting every run so
that people can't parse the output.

------
snom380
I find it more frustrating that network configuration tools seem to be added
in layer after layer, like with the new netplan took in Ubuntu. To me it seems
more complex than it needs to be.

~~~
userbinator
_new netplan took in Ubuntu_

Having fought that monstrosity very recently, I completely agree. The homepage
of its site looks more like a marketing blurb than anything else, and
everything about it has an unpleasant "enterprisey" feel to it. I don't care
about YAML or "abstract network renderers" or whatever buzzword-compliance
bingo it claims to support, I just want to configure one NIC for one static
IP.

The fact that Windows' networking configuration is actually _easier_ than on
"modern Linux" should be a sign that something has gone horribly wrong.

------
sureaboutthis
"... 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.

~~~
xtrapolate
> "Old does not mean bad"

It doesn't automatically mean "good" either.

> "in its pursuit to be Windows"

Would you please elaborate?

~~~
gerbilly
Windows subsumes a lot of small network daemons into a monolithic process
called SVCHOST.EXE.

Systemd does a similar thing.

~~~
theamk
What are you talking about? Systemd (pid 1) just does socket activation, it
has no high level functionality. Yes, there are related programs like systemd-
timesyncd, but they are completely separate processes, and can be managed
separately and even omitted altogether.

Now, traditional BSD inetd had discard, chargen, echo, ... protocol support,
which means that it was actually more integrated that systemd.

------
arpa
Well "replace" sounds very serious; but in fact iproute2 has been here long
enough to have replaced stuff already. I didn't really consider myself to be a
"grumpy old admin", but now I do, having used ip a lot back in 2003. I mean.
14 years have passed since I first used a mature! thing. And some people call
ip fresh...

------
nineteen999
I've perceived an acceleration in the rate of these changes in the last 2-3
years, and have started to put at least some of it down to Linux having
annihilated most of the competition in the UNIX server space.

With Solaris now headed for retirement and most of the rest of the SysV
ecosystem having collapsed over the preceding 20 years or so, it makes it
easier for companies like Redhat to "innovate" in new directions with less
pressure from developers and sysadmins alike.

I'm not sure how much of this is just my imagination, but the rate at which
"old world" UNIX commands and subsystems are being replaced or supplanted in
Linux certainly seems to have increased.

I agree with the author that some of these changes are forced by the
development in the kernel itself, but I consider that part of the same
phenomenon I guess.

------
bmn__
Bookmark [https://dougvitale.wordpress.com/2011/12/21/deprecated-
linux...](https://dougvitale.wordpress.com/2011/12/21/deprecated-linux-
networking-commands-and-their-replacements/)

~~~
sverige
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.

------
pulsarpietro
I am not sure it is such a big deal, the old stuff are good enough for the
majority of cases, I reckon. He has probably a good point about performance,
but pain versus gain I am not sure it makes a lot of sense, on average.

------
Communitivity
Ok. Fully admit, old unofficial sysadmin here (50, started with computers at
10 - and I don't work as a sysadmin, but often wind up helping our sysadmin
who has less experience). ifconfig, netstat, lsof are some of my top go to
tools. I haven't learned the iproute suite of tools yet, but this article is
prompting me to start doing that. It will be hard, my memory is fuzzy on when
net-tools commands first came out..I remember using Slackware in mid 90s, but
don't remember if they were in there yet, but I think I've maybe been using
them for 20 years, or close to it.

------
gcb0
the argument that applications using standard files must be update to another
api is BS.

the kernel should just map the faster api on those standard file descriptions
instead... but then, the "old" files were not part of a standard to begin
with... but then again, the standard, whatever it is, was never designed but
agreed upon after being in use by enough people.

I have no idea what to make of this. I guess I am just happy that people are
moving things forward, whatever the direction.

------
ccnafr
Back in 2005 I was actually wondering why ipsuite wasn't part of standard
Debian, tbh, which at the time was very big in the networking world

------
joelhandwell
So [https://netplan.io/](https://netplan.io/) was invented to replace them
right?

------
digi_owl
More and more it seems that smaller users of Linux gets the shaft to placate
the needs of the cloud behemoths...

------
tomc1985
the output of 'ip address' is so much harder to parse, visually :/

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

~~~
JdeBP
Of course, that does _not_ say that this was a systemd change, and reading
this very discussion at
[https://news.ycombinator.com/item?id=17151686](https://news.ycombinator.com/item?id=17151686)
shows that you lose your bet.

------
gsich
ifc TAB ENTER is just so much faster then ip addr.

~~~
WonkeyMonkey
I'm still used to typing ifconfig just out of muscle memory, but ip seems to
very loosely match

"ip a" will be matched the same as "ip addr" or "ip address"

Learning that made me much more accepting of the new command

------
a-dub
systemd is like the rajneeshpuram of Unix. first it's the init scripts, now
they want to take away ifconfig.

ask the people of Oregon how this will all work out...

------
hexo
ifconfig is obsolete for how long? 14 years or so? :)

------
diebir
Yeah damn idiots broke ifconfig so it already misses some interfaces. Just say
no to this insanity.

