Home > Article > Operation and Maintenance > Where is the location of the hosts file?
Where is the location of the hosts file?
In MAC systems, the location of the hosts file is: ~/private/etc
In Windows systems, the location of the hosts file is: C:\Windows\System32\drivers\etc
hosts file introduction:
hosts is a system file without extension, its basic function is Establish an associated "database" between some commonly used URL domain names and their corresponding IP addresses. When the user enters a URL that needs to be logged in in the browser, the system will first automatically search for the corresponding IP address from the hosts file. Once found, the system will immediately open the corresponding web page. If not found, the system will submit the URL to DNS. The domain name resolution server performs IP address resolution.
The above is the detailed content of Where is the location of the hosts file?. For more information, please follow other related articles on the PHP Chinese website!