一大数据大佬反馈说某云os配置主机名后不生效:
其实用man hostname可以了解到,是会返回机器IP地址的FQDN名称,如:
-A, --all-fqdns Displays all FQDNs of the machine. This option enumerates all configured network addresses on all configured network interfaces, and trans- lates them to DNS domain names. Addresses that cannot be translated (i.e. because they do not have an appropriate reverse DNS entry) are skipped. Note that different addresses may resolve to the same name, therefore the output may contain duplicate entries. Do not make any assumptions about the order of the output.
我们用tcpdump抓包看下:会发起DNS查询机器对应IP的名称解析
来源:oschina
链接:https://my.oschina.net/anthonyyau/blog/4328784