Path: csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod From: Max Nikulin Newsgroups: linux.debian.user Subject: Re: Domain name to use on home networks Date: Sun, 29 Oct 2023 17:30:01 +0100 Message-ID: References: X-Mailbox-Line: From debian-user-request@lists.debian.org Sun Oct 29 16:20:22 2023 Old-Return-Path: X-Amavis-Spam-Status: No, score=-2.189 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FOURLA=0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, LDO_WHITELIST=-5, NML_ADSP_CUSTOM_MED=0.9] autolearn=no autolearn_force=no X-Policyd-Weight: using cached result; rate:hard: -4.6 X-Injected-Via-Gmane: http://gmane.org/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla Thunderbird Content-Language: en-US, ru-RU X-Mailing-List: archive/latest/804575 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/uhm0ne$jjp$1@ciao.gmane.io Approved: robomod@news.nic.it Lines: 20 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Sun, 29 Oct 2023 23:19:55 +0700 X-Original-Message-ID: X-Original-References: <021F779C-D041-4550-BAA3-1F239361FE77@columbus.rr.com> Xref: csiph.com linux.debian.user:262871 On 27/10/2023 21:19, Greg Wooledge wrote: > More importantly, why on earth would this be recommended over editing > the /etc/hostname file, which is *much* simpler, and which appears to be > independent of the init system that's in use? hostnamectl tries to prevent split brain /etc/hostname vs. kernel structures in RAM. "hostnamectl hostname --transient NAME" does not work if /etc/hostname is present. Notice diverged static and transient names in Gene's message > Static hostname: coyote.home.arpa > Transient hostname: coyote "hostnamectl hostname NAME" besides changing /etc/hosts calls sethostname(2) (or what libc provided instead of it), so it is less chance that a user will get inconsistent settings by forgetting another command. I think, original intention was to provide D-Bus API for GUI and hostnamectl is just a CLI tool for that API.