The DNS domain name is the part after the first dot. Therefore it depends on the configuration of the resolver (usually in /etc/host.conf) how you can change it. Usually the hosts file is parsed before DNS or NIS, so it is most common to change the FQDN in /etc/hosts.
Apr 07, 2017 Set custom DNS servers on Ubuntu 18.04 or 20.04 - Ricmedia May 22, 2020 28.4. Changing Domain DNS Configuration Red Hat Enterprise A default limit of three servers is set for the /etc/resolv.conf file. Other information about configuring the /etc/resolv.conf file is given in the resolv.conf manpage. 28.4.3.
BIND consists of a set of DNS-related programs. It contains a nameserver called named, an administration utility called rndc, and a debugging tool called dig. See Chapter 12, Services and Daemons for more information on how to run a service in Red Hat Enterprise Linux.
[SOLVED] How to change the DNS server in Linux Mint, and Jan 24, 2017 [Solved]How to change DNS settings permanently? - Linux Oct 08, 2017
How to Setup a local DNS Caching Server on Linux? - Geekflare
Apr 07, 2017 Set custom DNS servers on Ubuntu 18.04 or 20.04 - Ricmedia May 22, 2020 28.4. Changing Domain DNS Configuration Red Hat Enterprise