Mac hosts mapped to domain names

Source: Internet
Author: User
Tags browser cache to domain
1, Control+space Open Spotlight, search "terminal"

2. Open Terminal

3, in the "Terminal" interface, enter: sudo vi/etc/hosts and then enter

4, will prompt you to enter the password XXXX. (Note that you do not see the * number when you enter the password)

5. After the input is successful, press E in the interface that appears to switch to edit mode

6, enter the hosts content you want to set, for example: 127.0.0.1 api.com

7, enter complete, if you want to save the exit, press [ESC], and then enter: wq! (note: Contains the preceding colon and the following exclamation point), and then press [enter],hosts to save the effect.

To avoid errors, it is best to clear the browser cache again.

Mac hosts mapped to domain names

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.