How to Edit Hosts File on Mac OS

In this article we will see how to modify or edit the hosts file in the MAC operating system, sometimes you need to modify or make some changes as per requirement. You can access your stored file in the MAC OS traditionally /private/etc/hosts.

How to edit the hosts file on MAC OS-

  1. Launch terminal application on the OS
  2. Type the following commands  at the command prompt field >> sudo nano /private/etc/hosts
  3. Enter the administrator password when requested, you will not able to see these if typed in the command line screen.
  4. Your host file is open now with nano,  use the navigation key to the bottom and make your hots file change 
  5. After modification hit on the keyboard ctrl+o followed by entering to make it change (Save)
  6. Now click Ctrl+ exit to out of nano command screen

“You should verify your change with ping, safari, and other networks.”

If you enjoyed this post, please consider following us on Facebook and Twitter.

Scroll to Top