Articles

How To Edit Mac Hosts File On Mac (Mac OS X)

by James B. software

Mac has a small host file that can specify your essential documents to a given IP address. Nowadays, we all are using the internet where we use various of a public and private server to a visual IP address and block sites that are not relevant to us or unused IP addresses. You can not only block these sites but also harmful threats from entering your system via edited host files. Here is the step on how to editing the Mac host.

Edit Your Mac Hosts File With Text Edit

Here are two basic ways to editing the Mac Hosts in the Apple MacOS device. The first one is applied by TextEdit earlier. The Mac host file is in a simple form of the document. Yet you can’t open your file easily until the Protected place of the system. Here you need to copy the unsafe files area on the desktop

  1. Edit it.
  2. Copy the selected files.
  3. Copy back the files.

First, you have to find Mac hosts file, then follow the command by pressing Spacebar+finder, then do these listed steps.

  1. Choose the Go Menu.
  2. Click on GO TO Folder.
  3. Here input /private/etc/hosts.
  4. Tap on Return.
  5. Under windows will be open here and show Your selected Mac’s hosts file, Tap on finder window and scroll down to the desktop.
  6. Here double click to open your file which displayed on your desktop screen.

How to Block IP Addresses

In the default option, there is a number of relevant documents that contain numerous lines.

Here all the lines that indicate Hashtag commented and not consider by Mac hosts file as well as etc. file.  You can make some notes that can help you in the future when you need to open these files.

Here every line of the text has been ignored by your PC. This is an excellent method to describe your notes and making notes. It contains an IP address that values your broadcast host and localhost.

Always remember when you are using other hosting websites that are not relevant can test these websites by using a developed web browser. You can also block migrates websites and access to a specific site.

Here are some examples that can help you to exactly what you can do into your device that entirely works for you. Or you can clock some websites who disturb you at the time of working. For example, you want to block facebook.com. To 1.1.1.1.

After that, whenever you try to input a valid IP address like www.facebook.com into your Macbook, its web browser will be failed to open that page, now you can work with your computer without any disturbance.

How to Reroute Web Addresses

Another way, when you input the IP address of an official website instead of 1.1.1.1., it can direct you to Facebook without choosing any sites.

To investigating a website’s IP address, you wish to use dig command that comes to standard with MacOS. We also open these sites by running the command on URL, that can return to your IP address.

Examples:

$ dig www.techjunkie.com +short/104.25.27.105

(Here you have informed about +shorts option)

$ sudo killall -HUP mDNSResponder

(Here you can enter required passwords)

$ sudo killall -HUP mDNSResponder; say DNS cache has been flushed

Ava Williams is a self-professed security expert; he has been making the people aware of the security threats. His passion is to write about Cybersecurity, cryptography, malware, social engineering, internet and new media. He writes for Mcafee products at mcafee.com/activate.

Source : Edit Mac Hosts File On Mac (Mac OS X)

Sponsor Ads


About James B. Advanced   software

68 connections, 8 recommendations, 326 honor points.
Joined APSense since, March 1st, 2019, From california, United States.

Created on Jan 14th 2020 07:37. Viewed 209 times.

Comments

No comment, be the first to comment.
Please sign in before you comment.