Telling Ubuntu what the local domain is

Nils Kassube kassube at gmx.net
Sun May 17 07:06:50 UTC 2020


Stuart McGraw wrote:
> My Ubuntu machine (running Ubuntu-20.04 Server) is on a local network
> with the domain ".home".  It is using the standard systemd-resolved
> resolver.  It has a hostname (in /etc/hostname) of "foo".
>
> If I ping another host on the local network, say "boo", I have to
> refer to it as "boo.home"; just doing "ping boo" fails with the
> error, "temporary failure in name resolution".
>
> I found I can fix this in two ways:
>
> 1. Change the hostname in /etc/hostname from "foo" to "foo.home".
>
> or
>
> 2. Add the line "search home" to /etc/resolv.conf.

Here is a third approach: In my router (running openwrt) I set the local
domain in the config of the DHCP server. Then I don't have to configure
the local PCs again when I change the OS.


Nils





More information about the ubuntu-users mailing list