Chris Green composed on 2026-09-30 08:31 (UTC+0100):

> What's the 'right' way to set a system's domain name permanenty (i.e.
> doesn't get lost when you reboot) on Debian systems?

> I don't think setting /etc/hostname to the FQDN is correct as, if you do
> that, then 'hostname' returns the FQDN and it should only return the
> host's name without the domain.

> I already have the following in /etc/hosts:-

>     127.0.1.1   t16.zbmc.eu     t16

> but this doesn't seem to have the required effect.

> It can't be done in /etc/resolv.conf as this file is generated (in my
> case by Network Manager). Is there a Network Manager setting that will
> put the domain name in resolv.conf?

How I do it:
1-don't have NetworkManager installed
2-have systemd-networkd installed
3-don't have systemd-resolved or resolvconf installed
4-configure systemd-networkd with static IP
5-configure /etc/hostname & /etc/resolv.conf manually
6-configure host in /etc/hosts

My PCs are almost exclusively desktops, and none ever leave the building.
-- 
Evolution as taught in public schools is, like religion,
        based on faith, not based on science.

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata

Reply via email to