Hosts file is an important file for us to access the Internet. Modifying hosts can help us speed up domain name resolution and block websites, etc. But there are many MAC users who don’t know where the hosts file is on the macOS. Today, I’ll show you how to find and modify the hosts file.

Method a,

**1.** Click finder in the bottom left corner of the MAC desktop;

** After opening finder, press the keyboard shortcut [Shift + CMD +G] and type [/private] to open a new page. In the private page, right click on etc and choose Show Introduction.

** Change the permissions of the etc folder and enter the password to complete the login.

** * change permission to read and write in share and Permission;

**5.** open the hosts file in etc, select “Display Introduction”, and change the permission of the file to “read and write”.

**6.** Open the hosts file and enter the host information.

Method 2,

**1.** Click the “Terminal” icon on the desktop to open the terminal;

** Enter “vim /etc/hosts”, the vim editor will open the hosts file.

**3.** directly enter the host address, this time save exit can be used.

These are the two different methods for modifying hosts files on MAC computers.