如何验证域名解析状态?
首先可以ping下域名,查看域名是否解析到IP地址;如下
➜ ~ ping aws.baby
PING aws.baby (185.199.111.153): 56 data bytes
64 bytes from 185.199.111.153: icmp_seq=0 ttl=51 time=80.452 ms
64 bytes from 185.199.111.153: icmp_seq=1 ttl=51 time=92.030 ms
也可以使用nslookup验证
➜ ~ nslookup aws.baby
Server: 202.106.0.20
Address: 202.106.0.20#53
Non-authoritative answer:
Name: aws.baby
Address: 185.199.109.153
Name: aws.baby
Address: 185.199.108.153
Name: aws.baby
Address: 185.199.111.153
Name: aws.baby
Address: 185.199.110.153
如果没有安装可以使用下面命令来安装
Windows Mac 貌似自带,可以使用nslookup验证下
yum install bind-utils #CentOS
apt-get install dnsutls #Ubuntu