/etc/hosts on Windows and Mac

The /etc/hosts (or hosts file) is a small text file that maps (domain-) names to IP addresses. It’s especially helpful when you want to use an easy to remember name for a computer in your home network. Another good reason to use it is for development purposes. With an entry in hosts file you can check if your website works long before the DNS system has distributed the new IP address.

 
On Linux /etc/hosts is the whole path and name of the file. If you need it, you simply type it in your console and there it is.

On Windows the same format and the same name are used. However, without a /etc folder the file is in a location no one can keep in their mind: C:\Windows\System32\drivers\etc\hosts

On the Mac the location is: /private/etc/hosts
 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.