主办Linux系统中的命令用于DNS(域名系统)查找操作。简而言之, 此命令用于查找特定域名的IP地址, 或者如果你想查找特定IP地址的域名, 则host命令变得很方便。你还可以通过指定相应的选项以及域名来查找域的更多特定详细信息。
语法如下:
host [-aCdlriTWV] [-c class] [-N ndots] [-t type] [-W time]
[-R number] [-m flag] hostname [server]
没有任何选项的主机命令:它将打印命令的常规语法以及可与host命令一起使用的各种选项, 并提供有关每个选项的简要说明。
例子:

主机命令的不同选项:
主机域名:
这将打印指定域的IP地址详细信息。
例子:
host lsbin.org

主机IP_地址:
这将显示指定IP地址的域详细信息。
例子:
host 52.25.109.230

-a或-v:
它用于指定查询类型或启用详细输出。
例子:
host -a lsbin.org

-t:
它用于指定查询的类型。
范例1:
host -t ns lsbin.com

范例2:打印SOA记录
host -t SOA lsbin.com

范例3:打印文本文件记录
host -t txt lsbin.org

-C :
为了比较权威名称服务器上的SOA记录。
例子:
host -C lsbin.org

-R:
为了指定重试次数, 你可以在一次尝试失败的情况下进行重试。如果有人尝试成功, 则命令将停止。
例子:
host -R 3 lsbin.org

-l:为了列出域中的所有主机, 要使此命令生效, 你需要是管理员或节点服务器。示例:host -l lsbin.org