In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
What is the meaning and function of host file and where is the location of host file? in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
The meaning and function of Host File
What is a HOST file:
Hosts is a system file without an extension, and its basic function is to establish an associated "database" between some commonly used URL domain names and their corresponding IP addresses. When a user enters a URL that needs to be logged in in the browser, the system will first automatically look for the corresponding IP address from the Hosts file. Once found, the system will immediately open the corresponding web page, if not found. Then the system will submit the URL to the DNS domain name resolution server for IP address resolution, and if it is found to be a blocked IP or domain name, it will be prohibited from opening this web page!
Location of the Host file:
In XP and win7 systems, the HOST file is located on the system disk C:\ Windows\ System32\ drivers\ etc. If you go in and do not see the Hos file, it is because some systems hide the Host file. Based on the above introduction, we can summarize the four main functions of Host files:
1. Speed up domain name resolution
For websites that you want to visit frequently, we can improve the speed of domain name resolution by configuring the mapping between domain name and IP in Hosts. Because of the mapping relationship, when we enter the domain name, the computer can quickly parse the IP without having to request the DNS server on the network.
For example: add an item to the Host file: 222.73.44.198 blog.itful.com (there must be a space between IP and the domain name, and the IP address must be entered correctly, otherwise you will not be able to visit the website)-- you can get the IP address of the website by running CMD and entering "ping website domain name"!
In this way, the speed of visiting Chivalrous Island will be a little faster, because he does not need to go through the DNS domain name server to resolve the IP address!
2. Convenient for local area network users
In the local area network of many units, there are servers for users to use.
However, because DNS servers are rarely set up in the local area network, it is necessary to enter difficult IP addresses when accessing these servers.
This is quite troublesome for many people. You can now give each of these servers an easy-to-remember name, and then establish an IP mapping in Hosts, so that when you visit later, just enter the name of the server.
3. Block websites
There are many websites that install a variety of plug-ins to your computer without the user's consent, including Trojans.
For these sites, we can use Hosts to map the domain name of the site to a wrong IP or the IP of the local computer, so that we don't have to visit it.
In Windows systems, the convention 127.0.0.1 is the IP address of the local computer, and 0.0.0.0 is the wrong IP address.
For example, in Hosts, enter the following (an example)
127.0.0.1 www.aacom # this website affects the healthy growth of my child, I want to block him
In this way, when the computer parses the domain name www.aa.com, it resolves to the native IP or the wrong IP, thus achieving the purpose of shielding unhealthy websites.
Now some viruses, malicious programs will modify our host file, so that we can not visit some websites. When we find that some websites cannot be accessed, we can go to the Host file for observation. If the website cannot be accessed because of the Host file, delete the statements added by the virus, we can visit the website normally.
The answer to the question about the meaning and function of the host file and the location of the host file is shared here. I hope the above content can be of some help to everyone. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.