How Mac systems Edit the Hosts file
Hosts is a system file without an extension, its role is to use some of the commonly used URL domain name and its corresponding IP address to establish an association "database", when the user in the browser entered a need to log in the URL, the system will first automatically from the Hosts file to find the corresponding IP address, once found, The system will immediately open the corresponding webpage, if not found, then the system will submit the URL to the DNS domain name resolution server for IP address resolution.
Editing the Hosts file can achieve a variety of purposes, such as: Speed up the domain name resolution, convenient LAN users, blocking websites, smooth connection system.
Tools/Materials
- MAC OS X operating system
Method/Step
Open Finder in the menu, select "Go to" and "Go to Folder"
Or use the shortcut key Command+shift+g
Enter the jump path and enter:
/private/etc/
Click "Go"
You can find the Hosts file
Right-click the file and select Open with text edit
To open to view its contents, but not to modify it directly
You can copy the hosts file to a different location (such as the desktop) if you need to modify it.
After you open it, edit it and save it,
Drag it back to the original folder and replace the original file.
END
Precautions
- To prevent accidental overwriting, you will be asked to enter a password, which is the unified password you set for the system.
How Mac systems Edit the Hosts file