/etc/hosts files under Linux

Source: Internet
Author: User

There is a/etc/hosts file below the Unix system, on my Mac, the contents of this file are as follows:

# # # Host database## localhost is used to configure the loopback interface# when the system is booting.  don't change this entry.##127.0. 0.1     localhost255.255. 255.255     broadcasthost::1             localhost

This file shows the mapping between the domain name and the URL. The URL that appears in this file does not require a DNS protocol to access it, but instead reads the domain name directly.

You can try adding a line at the end of the file:

192.168. 1.23    Www.baidu.com

This way in the browser to enter the Baidu website, will find Baidu homepage will never appear!

/etc/hosts files under Linux

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.