Subject: Re: How to set domainname with iproute2? (net-tools deprecation)

From: Stephen Hemminger <[email-masked]>
Date: Fri, 13 Mar 2020 10:00:41 -0700

On Fri, 13 Mar 2020 09:21:52 -0700
Chuck <[email-masked]> wrote:

> I see calls to move the world from net-tools to iproute2 [1] [2] [3].
> 
> My Linux distro uses the `hostname` executable from net-tools to set the
> hostname, which simply passes it through to the `sethostname` system call.
> I don't see any references to `sethostname` in the iproute2 sources.  I
> guess the replacement is systemd's `hostnamectl set-hostname`?
> 
> My distro uses the `domainname` executable (which is a symlink to
> `hostname`) from net-tools to set the domain name, which simply passes it
> through to the `setdomainname` system call.  I don't see any calls
> to `sethostname` in either iproute2 or systemd.
> 
> What is the recommended way to set the domain name during system
> start-up without net-tools?
> 
> (Asking here because iproute2 is supposed to replace net-tools.  If this is
> not the right list for this, 1. Apologies, and 2. Where is the right place
> for this inquiry?)
> 
> [1] https://lwn.net/Articles/710533/
> [2] https://lwn.net/Articles/710535/
> [3] https://wiki.linuxfoundation.org/networking/iproute2

Iproute2 is focused around netlink and supporting the kernel networking.