The file is in the /etc/ ” folder and you must open the file with administrator privileges.
With the Terminal application you can open it with using “sudo” command: sudo nano /etc/hosts.
Here is the text editor “nano” used. You can also use the “vi” or use “vim” editor (sudo vi /etc/hosts).
After the password prompt appears, put your password and press enter and edit the file.