What does the hosts file do?
The hosts file is a computer file used to store information about each node in a computer network; its function is to establish an associated "database" between some commonly used URL domain names and their corresponding IP addresses. When the user enters the When a URL needs to be logged in, the system will first automatically search for the corresponding IP address from the Hosts file.
The operating environment of this tutorial: Windows 7 system, Dell G3 computer.
What is the hosts file:
1. The hosts file is a computer file used to store information about each node in the computer network.
2. This file is responsible for mapping the host name to the corresponding IP address.
3. The hosts file is usually used to supplement or replace the function of DNS in the network.
4. Unlike DNS, computer users can directly control the hosts file.
5. Location of hosts file: C:\Windows\System32\drivers\etc
##Function of hosts file:
1. The hosts file can also be used in other situations. For example, a known advertising server can be redirected to an ad-free machine (usually the local IP address: 127.0.0.1) to filter advertisements. At the same time, you can also reduce bandwidth by not downloading online advertisements. Using the hosts file can also reduce access to the DNS server to speed up access and reduce bandwidth consumption. 2. Another important use of the hosts file is to intercept requests from some malicious websites, thereby preventing access to fraudulent websites or infection with some viruses or malware. But at the same time, this file may also be used by viruses or malware to prevent users from updating anti-virus software or accessing specific websites. 3. In addition, you can also modify the hosts file to force the website to be assigned to the correct IP, so as to access sites that cannot be accessed for some reasons. In addition, hosts files are often used in some software. The principle is to block the software from automatically connecting to the official server to verify information. The function of hosts is to 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 it from the Hosts file. The corresponding IP address will be helpful for everyone to operate the computer! For more programming related knowledge, please visit:Programming Video! !
The above is the detailed content of What does the hosts file do?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Title: Go Language Programming Guide: Implementation of Modifying the Hosts File In the daily software development process, we often encounter situations where we need to modify the hosts file in the operating system. The Hosts file is a text file without extension used to map IP addresses and host names. It is usually used to set up domain name resolution locally. In this article, we will introduce how to use the Go language to implement the function of modifying the hosts file of the operating system, and give specific code examples. First, we need to create a G that can modify the hosts file

The hosts file is a text file used to map IP addresses and host domain names, and is used to solve domain name resolution problems. In some cases, we may need to modify the hosts file, add or delete some entries. However, sometimes we may encounter the problem that the hosts file cannot be saved after modification. This article will explore why this problem may occur and provide some solutions. First, the hosts file is located in the system directory of the operating system. For example, the path under the Windows operating system is C:Wind

Some users requested to modify the Hosts file, but encountered the problem of not being able to save it when saving. This is because the Hosts file is a system file and usually requires corresponding permissions before it can be edited. Therefore, if you also encounter the following problems, you can refer to the article. Methods to solve the problem of no permission to modify the hosts file 1. Open the hosts file and uncheck the read-only option in front of it 2. If it shows that there is no permission when opening it, right-click the file and select properties 3. Click Safe to enter 4. Then try again Enter Advanced 5. Please enter "administrator" in the white box and click OK.

The hosts file in the win10 system is very important. It is closely related to functions such as blocking URLs and webpage jumps. Therefore, users often change file settings. Since the file is hidden by default, many users cannot find it. Here is help Everyone solves the problem. What to do if Win10 cannot find the hosts file? 1. First click on this computer, enter the folder through the Windows-Systen32-Drivers-etc path, click View at the top of the interface, and then click the Options button. 2. In the pop-up window, click the View tab above and find Hidden Protected Operating System Files in the Advanced Settings module. 3. You need to uncheck the option to hide protected operating system files in the prompt that pops up on the system.

Configuration steps: 1. Open a terminal or command prompt window, enter the "cd /etc" command to enter the "/etc" folder; 2. Enter the "vi /hosts" command to enter the hosts file editing interface; 3. In In the editing interface, press the "i" key to enter insert mode, and then manually enter or paste the content that needs to be added or modified; 4. After completing editing, press the "Esc" key to exit the insert mode; 5. Enter " :wq" command and press the Enter key to save and exit the editor; 6. Make a backup.

How to modify the hosts file in win10 system? I believe many friends have encountered this problem. Today, the editor has compiled the relevant content and the steps to solve it. Let’s take a look below. Steps to modify the hosts file in Win10 system 1. If you want to modify the hosts file, you first need to find this file. Open the "Run" dialog box, and then enter the hosts file path: C:\WINDOWS\system32\drivers\etc, and then click OK. 2. Then after finding the hosts file location, right-click on the hosts file, and then in the pop-up In the options, open "Properties", as shown in Figure 3. After opening the properties of the hosts file, click on "Security"

1. Open the device, enter the C drive, and locate C: windowssystem32driversetc; as shown in the figure: 2. Then, find the hosts file in the folder, right-click and select [Properties]; as shown in the figure: 3. In the hosts file Find the account you are using in the [Security] column in the properties window, give [Modify] and [Write] permissions, and click [OK]; as shown in the figure: 4. Then, open the hosts file in Notepad format; As shown in the figure: 5. Finally, enter a specified IP to access and save it. as the picture shows:

Steps to open the hosts file: 1. Open the file explorer; 2. Enter the following path in the address bar: C:\Windows\System32\drivers\etc\; 3. Under this path, you can find a file called "hosts " file; 4. Open the hosts file.