Reprint: The role of/etc/resolv.conf

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.