Windows 10 Edit Hosts file
In this tutorial, we will show you how to add a mapping of IP addresses to host names in the Windows Hosts file.
1. Notepad – Run as Administrator
In desktop, left-bottom search box, type notepad, right click on the notepad icon and select run as administrator.
2. Edit hosts
2.1 In Notepad (make sure run as administrator), locate and open the following file :
P.S In the open file dialog, select “All Files (*.*)”
2.2 Add a mapping of IP address to host name.
# Copyright (c) 1993-2009 Microsoft Corp. #... # localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost #add this new line 188.8.131.52 linode-hydra
3. Test It
In command prompt, ping linode-hydra, now it will return 184.108.40.206
C:\Users\mkyong>ping linode-hydra Pinging linode-hydra [220.127.116.11] with 32 bytes of data: Reply from 18.104.22.168: bytes=32 time=276ms TTL=51 Reply from 22.214.171.124: bytes=32 time=278ms TTL=51 Reply from 126.96.36.199: bytes=32 time=279ms TTL=51 Ping statistics for 188.8.131.52: Packets: Sent = 3, Received = 3, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 276ms, Maximum = 279ms, Average = 277ms