为什么我的主机文件不包含我经常访问的网站的 IP 地址?

How come my host file doesn't contain IP address of my frequently visited websites?

我做了 vim /etc/hosts,我的主机文件如下所示:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost

为什么它不包含我经常访问的网站的 IP 地址,如 whosebug.com、youtube.com、google.com、twitter.com 等。?

/etc/hosts 文件不适用于最近访问过的网站。 如果您没有配置 DNS 服务或者您想添加自己的服务器,您可以手动将 IP 和网站添加到您的主机文件中。