List of hosts file locations

I search every time, so make a note of it.

Location of hosts file

Windows10 C:\Windows\System32\drivers\etc\hosts

macOS /private/etc/hosts

CentOS7 /etc/hosts

Description

The hosts file is a setting file for the correspondence between the IP address and the host name, and is used when there is a correspondence that you want to use only on a specific computer. For example, it is used when connecting to the test server with the same host name as the production server on the development personal computer. The correspondence is described as "IP address (space or tab) host name" (example: "127.0.0.1 localhost").

Remarks

This article is a migration article from the blog "Technical Notes for Chores Engineers". The previous blog will be deleted.

Recommended Posts

List of hosts file locations
List of beginners (List) memo
Utilization of seed file
[Java] Delete the elements of List
Enumeration of combination patterns using List
[Rails] List instances of multiple models
Rotate by file size of logback
Replace the contents of the Jar file
Easy implementation of Android file browsing
A list of rawValues for UITextContentType.
Official logo list of the service
List of members added in Java 9
List of alternative distributions for CentOS