How do I restore my hosts file Mac?

How do I restore my hosts file Mac?

How to reset your Mac’s Hosts file

  1. Make sure Finder is selected on your Mac.
  2. Click on Go in the Mac menu bar.
  3. Click on Go to Folder.
  4. Enter /private/etc/hosts into the search field.
  5. Click Go.
  6. Drag the Hosts file from the Finder window onto your desktop.
  7. Open the Hosts file from your desktop.

How do I refresh etc hosts on Mac?

A proven strategy to scaling an owner-managed consultancy.

  1. Step 1 – Open Terminal. Open Launchpad and type Terminal.
  2. Step 2 – Open The Hosts File.
  3. Step 3 – Edit The Hosts File.
  4. Step 4 – Save The Hosts File.
  5. Step 4 – Save The Hosts File.
  6. Step 5 – Flush The DNS Cache.

How do I change permissions on host file Mac?

  1. Open TextEdit as sudo sudo -b /Applications/TextEdit.app/Contents/MacOS/TextEdit.
  2. Open /etc/hosts in this new TextEdit instance using any of the following methods: Append the path to the end of the previous command. Use File → Open. Drag the file to the sudo’d TextEdit on the Dock.

How do I flush my DNS on a Mac?

To flush your DNS cache on macOS Big Sur:

  1. Type in Terminal, and double-click the Terminal application under Top Hit to open it.
  2. Once Terminal is open, enter this command: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder.
  3. Enter your Mac’s password and then press Enter to clear the DNS cache.

How do I edit host file on Macbook Pro?

To edit the file, follow the steps below.

  1. Launch the macOS Terminal application.
  2. Go to the Finder, then Click Go.
  3. Click Utilities.
  4. Double-click Terminal to launch the Terminal window.
  5. Now, enter the following command: sudo nano /etc/hosts.
  6. Then, enter the sudo password for your user to allow edit access to the file.