[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: where does `hostname -f` derive the domainname from?



On Sonntag, 26. Juni 2022 22:32:38 CEST Jim Popovitch wrote:
> where does `hostname -f` derive the domainname from?
> 
> I have 2 systems, the first was buster --> bullseye with /etc/hostname
> containing "oscar" and `hostname -f` returning "oscar.domain.tld".
> 
> The second system is a clean install of bullseye with /etc/hostname
> containing "felix".  On this system `hostname -f` returns "felix".
> 
> DNS for both systems have FQDN entries.  Where should the domainname be
> set in a clean fresh install of bullseye?
> 
> tia,
> 
> -Jim P.

I checked using strace and it's appearently going through the following:

1. uname
2. /run/nscd/socket
3. /etc/nsswitch.conf
4. /etc/resolv.conf
5. /etc/hosts

Tuxifan



Reply to: