Check out example codes for "windows hosts file location". It will help you in understanding the concepts better.

Code Example 1

Hosts file location:
C:\Windows\System32\Drivers\Etc\hosts

Code Example 2

C:\Windows\System32\Drivers\etc\hosts

Code Example 3

c:\Windows\System32\Drivers\etc\hosts

Code Example 4

Windows 10 and Windows 8 = c:\Windows\System32\Drivers\etc\hosts

Learn ReactJs, React Native from akashmittal.com