Reprint website: http://jiao-zhong.blog.sohu.com/97976004.html
The file is a configuration file for DNS domain name resolution, and its format is simple, with each line beginning with a keyword followed by configuration parameters. There are four key words in resolv.conf, namely:
NameServer #定义DNS服务器的IP地址domain #定义本地域名search #定义域名的搜索列表sortlist #对返回的域名进行排序
An example of/etc/resolv.conf:
Domain test.comsearch www.test.com test.comnameserver 202.96.128.86nameserver 202.96.128.166
The most important is the nameserver keyword, if you do not specify nameserver can not find the DNS server, other keywords are optional.
-----------------------------------------------------------------------------------------------
PS: Recently encountered wget:unable to resolve host address ' ****** '
Workaround: vim/etc/resolv.conf
Add NameServer 114.114.114.114
Reprint: The role of/etc/resolv.conf