# Does ifconfig the same across all Unix-like OS?



## badbrain (Aug 9, 2019)

I noticed ifconfig on Solaris has a very different syntax from our ifconfig


----------



## balanga (Aug 9, 2019)

I noticed on some newer Linux distros that they no longer use `ifconfig`!!!  I think ip has replaced it.

Looking at FreeBSD's ifconfig() makes you realise just how powerfull/feature rich it is. Makes you wonder if anyone uses more than 5% of its capability


----------



## badbrain (Aug 9, 2019)

balanga said:


> I noticed on some newer Linux distros that they no longer use `ifconfig`!!!  I think ip has replaced it.
> 
> Looking at FreeBSD's ifconfig() makes you realise just how powerfull/feature rich it is. Makes you wonder if anyone uses more than 5% of its capability


I think they're both available. But the newer `ip` is recommended.


----------



## balanga (Aug 9, 2019)

blackdog said:


> I think they're both available. But the newer `ip` is recommended.





			https://www.unixtutorial.org/ifconfig-command-not-found
		


Looks like you specifically need to install it.


----------



## badbrain (Aug 10, 2019)

balanga said:


> https://www.unixtutorial.org/ifconfig-command-not-found
> 
> 
> 
> Looks like you specifically need to install it.


Don't know about that. On MX Linux 18.3 I have both of them preinstalled.


----------



## Phishfry (Aug 10, 2019)

system-d distro's use `ip a` and all that jazz.
Devuan uses `ifconfig` and their sysV init is very similar to ours.









						init - Wikipedia
					






					en.wikipedia.org


----------



## badbrain (Aug 10, 2019)

Phishfry said:


> system-d distro's use `ip a` and all that jazz.
> Devuan uses `ifconfig` and their sysV init is very similar to ours.


Almost forgot, MX Linux is also based on Devuan. It's the reason why I've both `ifconfig` and `ip` available


----------



## recluce (Aug 13, 2019)

Again shows the grubby tentacles of systemd everywhere in the OS with most Linux distros. I do not want my init to take over my network stack! 

Other non-systemd options would include Gentoo (optional) and Artix (based on Arch). These would use ifconfig.


----------



## SirDice (Aug 13, 2019)

recluce said:


> Again shows the grubby tentacles of systemd everywhere in the OS with most Linux distros.


'ifconfig' was already slowly being replaced by 'ip' long before systemd existed.


----------



## moridin (Aug 13, 2019)

`ifconfig` syntax is pretty much the same everywhere, it's the keywords that make the difference, but basic usage stays the same, e.g. `ifconfig if0 inet ... up`.

What *is* interesting in other implementations is the difference between (data)link and (IP) interface, more visible in Solaris (dladm/ipadm), less visible in Linux (why is it called 'ip' if it's not about ip only).


----------



## SirDice (Aug 13, 2019)

moridin said:


> but basic usage stays the same


Unless it's a wireless interface, then you need to use `iwconfig`. Or a bridge and need to use `brconfig`. Need VLANs? Then you need yet another command. It drove me bonkers, they're all network interfaces for crying out loud. 

I love the fact that _any_ type of network interface is configured using the same ifconfig(8) command on FreeBSD.


----------



## moridin (Aug 13, 2019)

SirDice said:


> Unless it's a wireless interface, then you need to use  iwconfig. Or a bridge and need to use  brconfig. Need VLANs? Then you need yet another command. It drove me bonkers, they're all network interfaces for crying out loud.



That's Linux, I presume (not really familiar with it)? In Solaris, I'd just use `dladm` to do all the *datalink* configuration (and I like the distinction).


----------



## SirDice (Aug 13, 2019)

I presume `ifconfig` just matches better with the Solaris kernel because, like FreeBSD, it's a complete OS. So the userland tools are perfectly matched with the kernel and its capabilities. With Linux there's a kernel, period. And you need a bunch of tools from other projects to make it work. Because they're separate projects the tools and the kernel never quite match up.


----------



## CraigHB (Aug 14, 2019)

SirDice said:


> Because they're separate projects the tools and the kernel never quite match up.



That's one of the main reasons I really like FreeBSD over other systems.   Things are a lot more seamless the way FreeBSD is developed.  I think it's one of the big failings of a purely "bazaar" model.


----------



## badbrain (Aug 21, 2019)

It's just the name is the same. Their arguments are completely different.


----------



## badbrain (Aug 21, 2019)

CraigHB said:


> That's one of the main reasons I really like FreeBSD over other systems.   Things are a lot more seamless the way FreeBSD is developed.  I think it's one of the big failings of a purely "bazaar" model.


I like Linux over FreeBSD. Because there's no base nor ports. Packages will use the openssl from the openssl package but not the openssl of the system. Get rid of a lot of problems.


----------



## drhowarddrfine (Aug 21, 2019)

badbrain Again I see you here bashing FreeBSD based on your knowledge which is sorely lacking.


----------



## kpedersen (Aug 22, 2019)

badbrain said:


> I like Linux over FreeBSD. Because there's no base nor ports.



You might want to check out Linux Standard Base
https://refspecs.linuxfoundation.org/lsb.shtml

More enterprise facing Linux distros very much adhere to this. For everything else (Even the big ones like Debian and Fedora), Linux is basically a free for all.

It kind of reminds me of playing with Raspbian Linux on the Raspberry Pi. Was the static IP address set it /etc/network/interfaces (Debian style)? Nope. Was it set in /etc/systemd/network (systemd style)? Nope.
It was set seemingly bizarrely in /etc/dhcpcd.conf. Yes the configuration file of a DHCP client... This is IMO unsuitable for its prime purpose of teaching kids about technology.
So I uninstalled much of the crap; added ifconfig and sys-v scripts and set it in rc.local and got on with my life.

As for ports; many Linux distributions do favour the ports approach (Gentoo, Arch). Also if you have ever had to package an .rpm or a .deb, it is nowhere near as elegant or as automated.


----------

