Hosts is a system file without extensions, you can use Notepad and other tools to open, its role is to use a number of commonly used Web site domain name and its corresponding IP address to establish an association "database", when the user in the browser to enter a need to log in to the URL, The system will first automatically find 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 be submitted to DNS domain name resolution server IP address resolution.
In simple terms, the Hosts file is a file for storing node information in the computer network, it can map the host name to the corresponding IP address, so as to achieve the function of DNS, it can be controlled by the user of the computer.
However, the location of the hosts file is not the same in different operating systems, and even the location of different versions of Windows is not the same. Next, let's look at the Hosts file location.
Under Windows 98 system the file is in the Windows folder.
In the Windows 2000/xp/vista/seven system located in the%systemroot%system32driversetc folder, where%systemroot% refers to the system installation path. For example, if Windows XP is installed in C:windows, the Hosts file is in C:windowssystem32driversetc.
But the Hosts file has system properties, the system default is not to display this file, so many friends found the corresponding folder but do not see the Hosts file, display system files method is:
Open My computer → tools → folder options → view, and then uncheck the hidden protected system files in the advanced settings, and then finish. At this time, all the system files in the computer will be displayed, Hosts file is no exception.
The Hosts file generally resembles the following basic content:
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings's IP addresses to host names. each
# entry should is kept on a individual line. The IP address should
# is placed in the ' the ' followed by the corresponding host name.
# The IP address and the host name should is separated by at least one
# space.
#
# Additionally, comments (such as) may is inserted on individual
# lines or following the machine name denoted by a ' # ' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source Server
# 38.25.63.10 x.acme.com # x client Host
127.0.0.1 localhost
Of course, you can also use the search function of Windows to find the Hosts file. This file is actually a plain text file, with ordinary text editing software such as Notepad can be opened and edited. The above is the Hosts file location introduction.