Hacker News new | ask | show | jobs
by vmp 3169 days ago
> ifupdown has been deprecated in favor of netplan and is no longer present on new installs [...]

> Given that ifupdown is no longer installed by default, its commands will not be present: ifup and ifdown are thus unavailable, replaced by ip link set $device up and ip link set $device down.

Sad to see this go; I always use ifup, ifdown and ifconfig. Yes, they're old and clunky tools but in a way they are the staple of a proper Linux installation to me.

Not to mention that it's quite a handful to write out "ip link set $device up".

7 comments

Yeah. This will no doubt affect me too.

On a related note, I've been meaning to read this article from 2011 for a good while now: https://dougvitale.wordpress.com/2011/12/21/deprecated-linux...

I guess it's getting about time to get it done now :)

> ifup and ifdown are thus unavailable, replaced by ip link set $device up and ip link set $device down.

That's weird, they do two very different things. ifup and ifdown apply / unapply the configuration in /etc/network/interfaces, like setting IP addresses, setting routes, running other commands you might have like configuring card-specific hardware things or sending notifications to other processes, etc. ip link set dev $dev up/down only enables or disables the card. They also require the card to exist already, in the case of bridges or bonds or VLANs or similar things.

Does netplan cause all of these things to be done automatically when the card is upped or downed?

> ifconfig ... staple of a proper Linux installation to me.

To be honest, I have a lot of muscle memory for ifconfig because it's what I grew up with, but also Linux's ifconfig has gotten very different from the BSD ifconfig (or ifconfigs? I know FreeBSD's and macOS's support different things), so it's not like it was a standard tool across UNIXes, just a standard name. I'm honestly happier with the Linux tool having its own name.

Also, ip supports things that ifconfig straight-up doesn't, like having multiple IP addresses on an interface (without configuring alias interfaces), creating various types of virtual devices, creating VLANs without using an even more awful tool, getting card stats (ip -s -s link) in a vendor-neutral way, etc.

I do really really hate the ip command's syntax though.

A tool is a tool, but holy hell do I hate ip's and iw's syntax, and the difficulty of automatically parsing their output compared to net-tools.
This is just such a shambles.

Great idea number 1: let's put all the functionality into one command line tool, and we'call it ip for ... "internet protocol"? Why is this ip tool managing my ethernet network card?

Great idea number 2: for this powerful swiss army knife, only a special syntax will do where we repeat the name of an argument before the argument value. To make sure no one can use it's functionality with less than 5 invocations, we'll have a hierarchical help menu that literally outputs BNF.

This tool is hardly new, I think it was introduced back in the nineties. http://linux-ip.net/gl/ip-cref/ says April 14, 1999.
I think it's not a good thing to mention age as if that matters much.

Would you argue that gpg is old and therefore good software?

I would argue instead that iproute2 was not picked up quickly because it's clunky and hard to reason about. openBSD managed to improve ifconfig enough that a change was not needed. I applaud that to be honest.

Sadly too much of IT is run on childish bravado these days.

End result is that anything older than the person talking is stale and clunky code best replaced by something written in the latest bling language that "everyone" raves about...

When it comes to standard unix tools, a part of me still feels 1999 is rather new. :)
and it was a pain in the arse then, and it's no better now.
> we'call it ip for ... "internet protocol"? Why is this ip tool managing my ethernet network card?

For CLI tools I use every day, their etymology is far less important to me than their brevity. "ip" suits the bill quite nicely.

Yeah, the name-before-argument thing can be annoying though, but again, at least they're all short.

Effectively the ip syntax reminds me of configuring cisco hardware, and not in a good way.
It's not like we're losing the previous tools completely. This is just switched defaults and net-tools and ifupdown are just one "apt install" away.
It stands for iproute not "internet protocol". :p
How did the "ip" get into "iproute"?
You could consider making an alias for both maybe? I know it's not the same, but at least then you can have your own shorthand for it.

I've done this and similar for commands I'm all too familiar with from time to time if I find myself typing the wrong one (sometimes I mix up Windows and Linux shell commands, PowerShell has helped with this at least by supporting plenty of Linux commands).

I wonder why netplan instead of straight-up systemd-networkd?

To avoid the usual "systemd takes away all my toys" shitstorm? Does systemd-networkd fundamentally lack anything which netplan doesn't?

"Server users now have their network devices managed via systemd-networkd on new installs. This only applies to new installations."
networkd is really designed more for server users, on a laptop that connects through wlan you want NetworkManager instead. Netplan is designed to be a single frontend to whichever of the two you are using.
fyi: you can shorten ""ip link set $device up"" to "ip l s $device up" (same for all ip commands, e.g. "ip address" can be shortened to "ip addr" or simply "ip a")
Yeah but please don't.... or at least don't create documentation or guides with the abbreviations.
To be honest, I didn't even know "addr" was short for address. When I was first taught iproute2 in 2007, I was told that the command was "ip addr" (and I'm fairly sure the very first iproute2 command I ever typed was "ip addr show").
`apt install ifupdown net-tools` and you have those tools again.