关键词:linux ubuntu16.04 查看 dns
1. 查看配置文件 /etc/resolv.conf
$ cat /etc/resolv.conf
# 结果
nameserver 114.114.114.114
2. 使用 nslookup 工具
用法:nslookup [host]
$ nslookup www.baidu.com
Server: 114.114.114.114
Address: 114.114.114.114
Non-authoritative answer:
www.baidu.com canonical name = www.a.shifen.com.
Name: www.a.shifen.com
Address: 14.215.177.38
Name: www.a.shifen.com
Address: 14.215.177.39
注:没有 nslookup 工具的同学,请安装 net-tools 工具包 apt/yum install net-tools