On Fri, Oct 27, 2023 at 3:14 PM Andrew M.A. Cater <amaca...@einval.com> wrote:
>
> On Fri, Oct 27, 2023 at 09:30:09AM -0400, Pocket wrote:
> >
> > > On Oct 27, 2023, at 9:05 AM, Greg Wooledge <g...@wooledge.org> wrote:
> > >
> > > On Fri, Oct 27, 2023 at 07:59:00AM -0400, Pocket wrote:
> > >>> On 10/27/23 07:50, Greg Wooledge wrote:
> > >>> On Fri, Oct 27, 2023 at 07:29:20AM -0400, Pocket wrote:
> > >>>> /etc/hosts
> > >>> If you're using short-form hostnames like this:
> > >>>
> > >>> unicorn:~$ hostname
> > >>> unicorn
> > >>>
> > >>> then yeah, that's all you need.  If you're using long-form hostnames
> > >>> (with dots in them), then you also need to configure /etc/hostname.
>
> hostnamectl set-hostname is the command to do it - and will survive a reboot.

Also see 
<https://systemd-devel.freedesktop.narkive.com/W2bL081i/how-do-you-set-the-machine-s-domain-name-with-systemd>,
where the systemd folks said to modify the hostname by hand because
hostnamectl butchered the fully qualified hostname.

I'm not sure if it still applies. I avoid hostnamectl. I don't care
about mDNS. DNS is the source of truth on my networks.

Jeff

Reply via email to