When you’re done making changes, press Control-X to exit the editor, Y to save, and Return to overwrite the existing hosts file.Īs we mentioned earlier, make sure to flush your DNS cache if you notice that your new mappings aren’t working properly. Because we launched Nano using sudo, any changes will be authenticated and saved directly to the original hosts file, without the need to copy it outside of its home directory.Ĥ. Just as we did with the TextEdit method above, we can add, edit, or remove hostname mappings at will. To navigate and edit the file in Nano, use the arrow keys on your keyboard.ģ. You’ll now see the hosts file open in the Nano editor or vim or another editor of your choice.
Google map for mac os x password#
As with all sudo commands, you’ll need to also enter your admin password to execute it: " sudo nano /private/etc/hosts“Ģ.
Google map for mac os x how to#
Your Mac will then come through the speakers saying “DNS cache has been flushed.” How to Edit Your Mac Hosts File In Terminal With Nano
![google map for mac os x google map for mac os x](https://www.hugpug.com/photos/sheba_layout/google_maps_1.jpg)
![google map for mac os x google map for mac os x](https://www.alphr.com/wp-content/uploads/2021/10/6-1.jpg)
![google map for mac os x google map for mac os x](https://openmtbmap.org/wp-content/uploads/macosx/planning_a_route.png)
In most cases, the new mapping should work immediately, but if you’re not seeing the correct behavior, you may need to flush your DNS cache, forcing the browser to read from your hosts file to determine the mapping. With the modified hosts file now in place, fire up your Web browser to test the changes. Choose Replace and then enter your administrative user password to authenticate the transfer. When you drop the hosts file back in its original location, macOS will ask you what to do about the unmodified hosts file that’s already there.