use*_*081 6 networking lan localhost domain-name
nslookup使用显示 <host>.localdomain查找本地域名。同样,如果我使用 nslookup 并检查 <host>.localdomain,它会在 Windows 和 Ubuntu 中解析为预期值。
“.localdomain”的意义是什么?它为什么会出现、为什么会起作用以及它可以信赖吗?是否在标准或其他内容中指定/是否特定于操作系统或制造商?它似乎是与 等效的域localhost,但我在任何地方都找不到它的记录。
查找本地主机的示例:
> nslookup me-fractal
Server: setup.ubnt.com
Address: 192.168.1.1
Name: me-fractal.localdomain
Address: 192.168.1.77
Run Code Online (Sandbox Code Playgroud)
示例显示localdomain实际上意味着什么:
$ nslookup testhost.localdomain
Server: 127.0.0.53
Address: 127.0.0.53#53
Non-authoritative answer:
Name: testhost.localdomain
Address: 192.168.1.198
Run Code Online (Sandbox Code Playgroud)
而任意值无法解析:
$ nslookup testhost.othervalue
Server: 127.0.0.53
Address: 127.0.0.53#53
** server can't find testhost.othervalue: NXDOMAIN
Run Code Online (Sandbox Code Playgroud)
我认为值得注意的是,该值不会出现在https://serverfault.com/a/937808(或其他答案)中。