How Mac systems Edit the Hosts file

Source: Internet
Author: User

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
    1. Open Finder in the menu, select "Go to" and "Go to Folder"

      Or use the shortcut key Command+shift+g

    2. Enter the jump path and enter:

      /private/etc/

      Click "Go"

    3. You can find the Hosts file

    4. Right-click the file and select Open with text edit

      To open to view its contents, but not to modify it directly

    5. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.