一 /etc/hosts:
(1)/etc/hosts:The static table lookup for hostnames(详情:man 5 hosts)。
(2)/etc/hosts associates IP address with hostnames,one line per IP address.
*格式:IP_address canonical_hostname [aliases...别名]
注意:通常LINUX主机查询对方的身份时,首先查询/etc/hosts文件的设置,接下来是/etc/resolv.conf的DNS主机
二 /etc/resolv.conf(DNS域名解析的配置文件):
(1)/etc/resolv.conf:resolver configuration file(详情:man 5 resolv.conf)。