hostname -A会做啥

早过忘川 提交于 2020-07-28 03:44:17

一大数据大佬反馈说某云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的名称解析

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!