Hots Mac Os



Your mac has a hosts file which contains a list of IP and domain addresses. Whenever a URL is accessed on the Mac using the browser or other apps, the system first checks for entries in the hosts file and fetches the IP address if found. So one can edit Mac’s hosts file to block specific domains like those sending ads or malware. It can be used to block unsafe sites on a Mac or even help downgrade iPhones to older firmware.

Where is Mac’s Hosts File Located:

30 keyboard shortcuts Mac users need to know This collection of keyboard shortcuts for macOS can help users get the most from their iMacs, MacBook Pro and MacBook laptops. How to download Mac OS El Capitan I need to download the El Capitan to install on my Mac computer. What is the best place to download the El Capitan dmg or El Capitan iso.

You can find the “hosts” file in private>etc folder on the active startup partition. In order to edit it and save changes you need the rights of a root user, as this is an important system file.

Default Content of Hosts File in Mac OS X:

Hot Key Mac Os X

There are four very important entries in the hosts file which should not be messed with. In case you did change something you shouldn’t have or wonder which entries existed from the beginning, here are the default contents:

127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost

Hots Mastery Ring

As you can see for yourself, the entry on the left side is the IP address for the domain mentioned on the right hand side.

How to Edit Mac’s Hosts File:

  • Launch Terminal from Applications > Utilities or Spotlight(Command + Space)
  • Open hosts file by typing the command sudo nano /private/etc/hosts and press enter
  • Add or delete entries as required. IP address on the left and domain name to the right, under the four existing entries.
  • Save the hots file by pressing control+O followed by enter. Press control + X to exit the editor.

Now that you’ve learnt how to edit the hosts file let’s see how to apply it in a useful situation.

Mac

Blocking Access to a Website in Mac OS X:

Mac

Suppose I want to stop access to a website called www.notforkids.com. Here’s the line that needs to be added at the end of the hosts file.

127.0.0.1 notforkids.com

Trick Mac by Redirecting to Another Site:

You might have come across this method while downgrading iPhone firmware. Since, Apple does not officially allow downgrading devices to older iOS firmware developers add the following line to the hosts file to trick iTunes into believing it is talking to Apple’s servers(gs.apple.com) while it is in fact talking to Saurik’s servers.

74.208.10.249 gs.apple.com

That’s all for this tutorial. If you face any difficulties, feel free to ask.

More from my site