Linux下的host命令

Linux下的host命令

分析域名查询工具,测试域名系统工作是否正常

语法:
host (选项) (参数)
选项:

  • -a : 显示详细的DNS信息
  • -c<类型> : 指定查询类型,默认值为“IN”
  • -C : 查询指定主机的完整的SOA记录
  • -r : 在查询域名时,不使用递归的查询方式
  • -t<类型> : 指定查询的域名信息类型
  • -v : 显示指令执行的详细信息
  • -w : 如果域名系统服务器没有给出应答信息,则总是等待,直到域名服务器给出应答
  • -W<时间> : 指定域名查询最长时间,如果在指定时间内域名服务器没有给出应答信息,则退出指令
  • -4 : 使用IPv4
  • -6 : 使用IPv6

参数:

  • 主机: 指定要查询信息的主机信息

CenOs下使用失败,尝试yum install bind-utils

➜  ~ host www.baidu.com
zsh: command not found: host
➜  ~ yum install bind-utils
➜  ~ host -h
host: illegal option -- h
Usage: host [-aCdilrTvVw] [-c class] [-N ndots] [-t type] [-W time]
            [-R number] [-m flag] hostname [server]
       -a is equivalent to -v -t ANY
       -c specifies query class for non-IN data
       -C compares SOA records on authoritative nameservers
       -d is equivalent to -v
       -i IP6.INT reverse lookups
       -l lists all hosts in a domain, using AXFR
       -m set memory debugging flag (trace|record|usage)
       -N changes the number of dots allowed before root lookup is done
       -r disables recursive processing
       -R specifies number of retries for UDP packets
       -s a SERVFAIL response should stop query
       -t specifies the query type
       -T enables TCP/IP mode
       -v enables verbose output
       -V print version number and exit
       -w specifies to wait forever for a reply
       -W specifies how long to wait for a reply
       -4 use IPv4 query transport only
       -6 use IPv6 query transport only

➜  ~ host www.baidu.com
www.baidu.com is an alias for www.a.shifen.com.
www.a.shifen.com has address 14.215.177.38
www.a.shifen.com has address 14.215.177.39
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Erice_s

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值