How to modify the hosts file
How to modify the hosts file?
How to modify the hosts file
Since the hosts file is a system file, administrator rights are required to modify it.
The first method: first change the permissions to administrator permissions, and then modify them.
Second method: First copy the hosts file to the desktop. At this time, administrator rights are no longer required, so you can modify it. After modification, drag it back to the original directory and replace the original file. document.
Related recommendations: Where is the location of the hosts file?
hosts file modification example:
202.108.22.5 www.baidu.com
As shown above, we are In the local hosts file, a mapping relationship is established between Baidu's IP address and Baidu's domain name, which plays the role of "speeding up domain name resolution" because there is no need to request a DNS server! In addition, if we want to comment it, we can just add the # symbol in front, for example:
#202.108.22.5 www.baidu.com
The above is the detailed content of How to modify the hosts file. 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



Solution to changing hosts in Linux does not take effect: 1. Find and open the "/etc/sysconfig/network" file; 2. Modify HOSTNAME to the corresponding alias, such as "NETWORKING=yes HOSTNAME=host1"; 3. Through "service network restart" command to restart the network service.

How to solve the problem that the hosts file in Win10 system is missing? The hosts file is a very important file in a Win10 computer. Recently, some friends found that their hosts file was missing when they wanted to modify the hosts file. So what should they do if they encounter this situation? Let’s take a look at how to recover the missing hosts file in Win10 system with the editor. How to recover the missing hosts file in Win10 system 1. Open C:WindowsSystem32driversetc; 2. Open the view option; 3. Remove the check mark in front of Hide protected operating system files and confirm; 4. Refresh and you will see the Hosts file.

As a user of Windows 10, have you encountered the dilemma of being unable to save changes when trying to modify the hosts file? This file can be regarded as a "database" that closely links the URL domain name and its corresponding IP address. So how to cleverly How to deal with this situation? What should I do if the hosts of Win10 Home Edition cannot be modified? 1. Press the Ctrl+C shortcut key to copy the following path: C:\Windows\System32\drivers\etc. 2. Paste this path into the address bar in the file manager and right-click the upper right corner of the folder where the hosts file is located. 3. Select the "File" menu, select the WindowsPowerShell option, and then a dialog box will pop up. 4

Microsoft has released a new feature update for PowerToys. Version 0.64.0 is available for download now and includes two brand new utilities, settings backup and an extensive list of fixes. PowerToys 0.64.0 introduces a new FileLocksmith utility (shown below). It allows you to see which process or processes use selected files or folders, thereby preventing them from being deleted or modified. The second new tool provides a simple and convenient UI for editing Hosts files—no more digging into your system drive and opening Hosts in Notepad. You can view detailed information about processes and even end them if necessary. 0.64.0

Deleting the hosts file has no effect; hosts is a system file without an extension, which can be opened with tools such as Notepad. Its function is to establish an associated "database" between some commonly used website domain names and their corresponding IP addresses; when the user is in When you enter a URL that requires login into the browser, the system will first automatically search for the corresponding IP address in the Hosts file. Once found, the system will immediately open the corresponding web page. If not found, the system will submit the URL to the DNS domain name resolution server. Perform IP address resolution.

The location of the hosts file is in the "etc" folder. The specific search method is: 1. Enter "Computer" from the desktop and double-click to open "C drive"; 2. Double-click to open "windows" -> "System32" -> "drivers" "-> "etc"; 3. Double-click to open the "etc" folder to find the "hosts" file.

The location of the hosts file in Linux hosts is a system file without an extension. Its function 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 the corresponding IP address in the Hosts file. Once found, the system will immediately open the corresponding web page. For all Linux operating system distributions, the hosts file is located at: /etc/hosts Extension content The hosts file (domain name resolution file [1]) is a computer file used to store information about each node in the computer network. This file is responsible for mapping host names to corresponding IP addresses. hosts file

The path of the hosts file is "C:\Windows\System32\drivers\etc". Hosts is a system file without an extension. Its function 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 start from Find the corresponding IP address in the Hosts file and open the corresponding web page; if not found, the system will submit the URL to the DNS domain name resolution server for IP address resolution.
